-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highmaps: Add option to provide custom colorAxis interpolation function #9350
Comments
Hi @cscgrad Thank you for submitting the enhancement idea. |
Hi @cscgrad Could you share your demo (e.g. in jsFiddle or any other sandbox)? I'm not sure about this choppy rendering. At this moment, it should be possible by simple value normalization, something like this: Highcharts.wrap(
Highcharts.ColorAxis.prototype,
'normalizedValue',
function (proceed, value) {
var normalized = myInterpolation(value);
return proceed.apply(this, normalized);
}
); (note: code not tested, simple example appreciated ) |
Hi @pawelfus My scenario is a multi-level drill-down map (The top-level is the US National map, then the county-level map, and finally the zip-level map). I'm looking to generate dynamic color axis data classes (that support null values) based on the series data. The computation for the dynamic data classes (or ranges) is based on quantiles. I have it working exactly as I want it to, but I was hoping that it could render faster if I could somehow perform the dynamic data class computation internal to highmaps v.s. externally as shown in the example below (the calls to updateMapColorAxis( ) as well as the initial call to getColorAxisDataClasses). I think it would be really cool if you could add a feature like this into highmaps. Here's the simplest I could make it: Any suggestions would be appreciated. |
Thank you for the example! Now I understand the issue - you need customization for dataClasses - I misunderstood your first post, sorry. My idea posted above based on gradient-based colorAxis. In general, what you did makes sense. If you want to show dataClasses then you need to update colorAxis anyway, I don't think it makes sense to provide specialized API for just drilldown+dataClasses change when Thanks! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! |
Expected behaviour
I'm looking for the ability to provide a custom function that calculates data classes on-the-fly (similar to how the built-in linear and logarithmic interpolation options work) to be used to shade map. As a workaround, I'm able to make it work using:
But the rendering becomes choppy when there are a lot of map regions/data points, so I was thinking it would perform faster if I could substitute my own interpolation function.
Product version
Highmaps 6.1.3
The text was updated successfully, but these errors were encountered: