简体   繁体   English

是否可以为HighCharts热图数据设置最小值和最大值?

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

Scenario: I have a heatmap (built with Angular) that is backed by a LARGE data set that is paginated. 场景:我有一个热图(使用Angular构建),该热图由分页的LARGE数据集支持。 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. 渲染的热图将为20x20,但其背后的实际数据集为400x400或更大。 Instead of loading all the data at once, each time I page the X or Y axis, I will re-render the heatmap. 每次我翻页X轴或Y轴时,我都会重新渲染热图,而不是一次加载所有数据。

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. 在渲染页面x1,y1之前,我将知道400x400网格的最小值和最大值。 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? 如何确保色标基于400x400热图上的最小值和最大值,而不是基于20x20热图上的特定数据?

I hope the explanation is straightforward enough. 我希望解释足够简单。

Thanks! 谢谢!

You should be able to set the colorAxis.min and max if you know the values like you said like so: 如果您知道像这样说的值,则应该能够设置colorAxis.minmax

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM