Skip to content
Snippets Groups Projects
Commit 1b3f3cf3 authored by stevereis's avatar stevereis
Browse files

Add axis label and categories

parent 98d41211
No related branches found
No related tags found
No related merge requests found
import { ObjectType, Field } from '@nestjs/graphql';
@ObjectType()
export class ChartAxis {
@Field({ nullable: true, defaultValue: '' })
label?: string;
@Field(() => [String], { nullable: true, defaultValue: [] })
categories: string[];
}
import { Field, ObjectType } from '@nestjs/graphql'; import { Field, ObjectType } from '@nestjs/graphql';
import { ChartAxis } from './common/chart-axis.model';
import { Result } from './common/result.model'; import { Result } from './common/result.model';
@ObjectType() @ObjectType()
...@@ -9,9 +10,9 @@ export class HeatMapResult extends Result { ...@@ -9,9 +10,9 @@ export class HeatMapResult extends Result {
@Field(() => [[Number]]) @Field(() => [[Number]])
matrix: number[][]; matrix: number[][];
@Field(() => [String]) @Field(() => [ChartAxis])
xLabels: string[]; xAxis: ChartAxis;
@Field(() => [String]) @Field(() => [ChartAxis])
yLabels: string[]; yAxis: ChartAxis;
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment