We are using the High Density Scatter Series. You can set 2 colors for this series, one for the higher density areas, a "Heat map".
We need to show more than 2 colors, we would like to use a Rainbow Gradient, using different ranges for each color.
For example, from 0 to 1000 use RED, from 1000 to 2000 Orange, from 2000 to 3000 Yellow, etc. And have a smooth interpolation from one color to the other using HSV,
like this.
Does the Chart offer this capability? Or is there a way we could customize the way points are being colored right now?
Hello Dzyann,
The High Density Scatter Series does not support more than 2 colors and if you would like to see this feature supported please submit product idea on this website:
However, if you are planning to plot small number of data points (e.g. <1000) then you should use Bubble Series which supports all your requirements (including HSV interpolation for multiple color ranges) Here an sample of Bubble Series.Note that Bubble Series requires 3rd numeric data column (in addition to x/y values) to map to radius of bubbles but you can turn it off by setting the RadiusScale property to:
BubbleSeries.RadiusScale.MinimumValue = 5;
BubbleSeries.RadiusScale.MaximumValue = 5;
This ways, you will get bubbles of the same size for all data points like in your screenshot. Let me know if you have more questions about Data Chart control.
Martin, thanks for the prompt answer. But isn't there a way I could intercept when the colors are calculated and change them? Maybe with a behavior, or something like that?
Thanks!
Unfortunately, there is no access to internal logic that calculates these colors nor you can change them. Again, I suggest you using Bubble Series which provides more options for changing colors of markers by assigning ValueBrushScale or CustomPaletteBrushScale object to BubbleSeries.FillScale property.
Oh, that's too bad, because our clients require this behavior with a High Density Graph.
On the Bubble Series, is there a way to define the algorithm that is used to trim the points? As you scroll in and out you can notice some of the points disappear which causes the graph to lose its actual shape. If we could define the algorithm that decimates the points it would be really useful.
For performance reason, DataChart displays only a few hundreds of markers in plot area. You can adjust this behavior by using BubbleSeries.MaximumMarkers property.
Hi MartinT,
I found that setting, and sadly just with 10k points the performance is dreadful. I opened the Product Idea as you requested.
Thanks
While we evaluate your product idea, I can optimize your application if you can share it and/or detailed specs about what are you trying to achieve with so many data points. Also, is your data source static or are you making changes to data items?