0

As per the attached snapshot scale/range of the heatmap is displaying the data values. Need to display value in units i.e like 2140000 to be displayed as 2 GB.

Code Sample -- Pic export class App {

//single: any[];
multi: any[];

// Size to be displayed 
view: any[] = [1000, 400];

// options

showXAxis = true;
showYAxis = true;
gradient = false;
showLegend = true;
showXAxisLabel = true;
xAxisLabel = 'Hour';
showYAxisLabel = true;
yAxisLabel = 'Days';

}

Refer Plunker

Manhar Sapra
  • 659
  • 1
  • 11
  • 21

2 Answers2

0

Here is what I think.

You can simply add suffix with this class:

::ng-deep .scale-legend-label span:after {
  content: " GB";
}

But to display values in other units, you should provide already calculated ones to the heatmap:

Before you pass data to [results], execute a method which will convert the data to GB.

Simderi
  • 43
  • 7
0

I think you need to format each data to GB unit. Then your legend will follow to this unit too.

Actually, there's some ways to customize your legend like this advanced-legend example on the official repo or this one.

There's also an opened issue about that on the official repo again.

So for the moment, I think you should format the chart's data to GB unit to make the legend follow. Or customize the legend as shown above, or wait an official feature.

Maxime Lafarie
  • 2,172
  • 1
  • 22
  • 41