Any way to set min & max value for HighCharts Heatmap data?

1.2k views Asked by At

Scenario: I have a heatmap (built with Angular) that is backed by a LARGE data set that is paginated. Each time I will only get a portion of that data and re-render the heat map for each 'page' load.

ex. The rendered heatmap will be 20x20 but the actual data set behind it is 400x400 or larger. Instead of loading all the data at once, each time I page the X or Y axis, I will re-render the heatmap.

This works great - however the color stops get adjusted based on the 'page' data each time.

I will know the minimum value and the max value of the 400x400 grid before I even render page x1,y1. How can I ensure the color stops are based on the min and max values on the 400x400 heatmap and not on data specific to the 20x20 heatmap?

I hope the explanation is straightforward enough.

Thanks!

1

There are 1 answers

0
wergeld On BEST ANSWER

You should be able to set the colorAxis.min and max if you know the values like you said like so:

    colorAxis: {
        min: 1,
        max: 1000,
        type: 'logarithmic',
        gridLineWidth: 2,
        gridLineColor: 'white',
        minorTickInterval: 0.1,
        minorGridLineColor: 'white',
        tickLength: 0
    },