Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Feature Request: Add ability to disable auto-ranging of Weights in HeatSeries #486

Closed
benpocalypse opened this issue Mar 8, 2017 · 1 comment

Comments

@benpocalypse
Copy link

benpocalypse commented Mar 8, 2017

How to reproduce?

Extra notes

When a HeatSeries contains points with all the same Weights, the Legend will update to show no actual range between values, and thus, just show blank points in the chart like this: Heat Series points with all the same Weights

When the HeatSeries point values are different (have a range) the display appears as one would expect, like this: HeatSeries points with range of Weights

Although it goes against the current design of the LiveCharts library in regards to the *Algorithms structure, it would be nice to be able to specify a range for the HeatSeries colors to respect so that in the case that the values are the same, it doesn't Auto-range and remove the gradient colors.
In all the chart types, the weight ranges are specified in the X and Y axis' ranges. I tried to work around this by putting dummy points on the HeatSeries that contain the min and max values I'd like, and then move them off the chart by setting their X and Y values to -1, but the chart view automatically expands to include them.

If I have time, I'll fork, attempt to implement the change, and do a PR.

I am using

Live-Charts version 0.9.3.5
.Net Version 4.5.2
Windows Windows 7 SP1
@beto-rodriguez
Copy link
Collaborator

Thank you very much for the report, the reference commit prevents this issue.

The interpolation failed because we had an undefined operation 0/0

What I just did is, if weigh = double.NaN then use the first step in the gradient.

I think this should be enough.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants