I am using ViewXY's IntensityMeshSeries to draw a HeatMap and contours.
Contour lines are drawn at the maximum value of ValueRangePalette, but there are parts where lines are not drawn even at the same Step.
Are there any countermeasures?
thank you.
Some contour lines are not drawn
Moderator: Queue Moderators
-
- Posts: 557
- Joined: Mon Mar 14, 2016 9:22 am
Re: Some contour lines are not drawn
Probably resolution of your IntensityMesh is low.
You could try to increase ContourLineStyle.Width, as default just 1 px.
You can read/get the list of contour lines with _intensityMesh.GetContourRoutes() method. Afterwards, you can use LiteFreeformLineSeries or FreeformPointLineSeries to draw those polylines as separate object/series.
Hope this helps.
You could try to increase ContourLineStyle.Width, as default just 1 px.
You can read/get the list of contour lines with _intensityMesh.GetContourRoutes() method. Afterwards, you can use LiteFreeformLineSeries or FreeformPointLineSeries to draw those polylines as separate object/series.
Hope this helps.
Re: Some contour lines are not drawn
I was able to draw contour lines without any problem.
I tried changing the thickness of the line using the first method, but there was no change.
I was able to achieve it by redrawing using the second _intensityMesh.GetContourRoutes() and FreeformPointLineSeries.
However, with this method, the contour line information obtained by _intensityMesh.GetContourRoutes() will not be updated unless it is redrawn with EndUpdate(), so the contour line cannot be redrawn.
1st.
2nd.
Contour lines flicker because the chart has to be drawn in two steps.
Are there any countermeasures?
thank you.
I tried changing the thickness of the line using the first method, but there was no change.
I was able to achieve it by redrawing using the second _intensityMesh.GetContourRoutes() and FreeformPointLineSeries.
However, with this method, the contour line information obtained by _intensityMesh.GetContourRoutes() will not be updated unless it is redrawn with EndUpdate(), so the contour line cannot be redrawn.
1st.
Code: Select all
BeginUpdate()
--- draw mesh ---
ContourLineType = ContourLineTypeXY.ColorLine;
EndUpdate()
Code: Select all
BeginUpdate()
_intensityMesh.GetContourRoutes()
--- Redraw Contours ---
mesh.ContourLineType = ContourLineTypeXY.None;
EndUpdate()
Are there any countermeasures?
thank you.
-
- Posts: 557
- Joined: Mon Mar 14, 2016 9:22 am
Re: Some contour lines are not drawn
As far as I know, _intensitySeries.GetContourRoutes() itself does not require EndUpdate() call.
It just require that _intensitySeries.Data property is already set, as well as _intensitySeries.ValueRangePalette property.
Therefore, this means that you basically could include _intensitySeries creation and FreeformPointLineSeries creation in the same BeginUpdate-EndUpdate batch.
If you changing some _intensitySeries parameters (like palette or grid values), you should clear line-series and call GetContourRoutes() method again.
If something is not working as expected, maybe you should send/share your (test) project with us (you can also sent directly to Support(at)lightningchart.com email)
It just require that _intensitySeries.Data property is already set, as well as _intensitySeries.ValueRangePalette property.
Therefore, this means that you basically could include _intensitySeries creation and FreeformPointLineSeries creation in the same BeginUpdate-EndUpdate batch.
If you changing some _intensitySeries parameters (like palette or grid values), you should clear line-series and call GetContourRoutes() method again.
If something is not working as expected, maybe you should send/share your (test) project with us (you can also sent directly to Support(at)lightningchart.com email)
Re: Some contour lines are not drawn
I'm sorry. It seems that I was mistaken.
I checked and it seems to be drawn correctly.
When I zoom in on the chart, the color hierarchy and contour lines are out of alignment. Is it possible to fix this?
ContourLineType or FreeformPointLineSeries gives the same result.
thank you.
I checked and it seems to be drawn correctly.
When I zoom in on the chart, the color hierarchy and contour lines are out of alignment. Is it possible to fix this?
ContourLineType or FreeformPointLineSeries gives the same result.
thank you.
-
- Posts: 557
- Joined: Mon Mar 14, 2016 9:22 am
Re: Some contour lines are not drawn
Intensity-series Fill and Contour-Line calculations use slightly different algorithms. Therefore, they are not aligned pixel-by-pixel. I believe, that Contour-Line calculation are more precise, because algorithm divides grid-cell in more triangles.
One way to avoid it is increase resolution of Intensity-series data. That is, up-sample grid.
Another solution, which actually should have been mentioned in first place, is setting
'Fast' uses GPU based calculation, which suppose to be faster, but lack precision. Typically contour-line with this settings are very wide, but maybe this is that you need.
One way to avoid it is increase resolution of Intensity-series data. That is, up-sample grid.
Another solution, which actually should have been mentioned in first place, is setting
Code: Select all
_heatmap.ContourLineType = ContourLineTypeXY.FastColorZones; // or FastPalettedZones