SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
I’m working with the 2D Heatmap. I am setting the DrawMajorGridlines to true but they aren’t showing up. I then realized that I could set the Opacity of the series to something different than 1 and the gridlines are shown.
The problem with this is that I want my series background (i.e. all the places where my heatmap has no data double.NaN) to be shown in white, but setting the opacity to something different than 1 makes the background black.
I have tried to set the background to almost anything (Surface, Series, GridLinePanel) and it’s not affecting it.
Am I missing something?
I attach an image.
Sorry for not responding to this thread faster. We’ve been quite busy recently and couldn’t investigate the issue earlier.
I’ve taken a quick look at the sample you’ve sent to us, but couldn’t get it working. It crashed with a XAML Parse exception. So I’ve exported our “HeatMap With Text” example with my modifications and decided to send it to you. Please find it attached.
I tested it with the latest build #v126.96.36.19981, using HighSpeedRenderSurface renderer. Please try it out and let us know if it gives the expected output for you,
I’ve tried to reproduce this issue on our side, but couldn’t. The only thing I’ve found out is that having AxisBands switched on may cause black background where vertical bands and horizontal bands intersect.
However, turning off AxisBands and setting a white background to GridLinesPanel helped to resolve this issue. Please refer to the attached screenshot.
<s:SciChartSurface> <s:SciChartSurface.GridLinesPanelStyle> <Style TargetType="s:GridLinesPanel"> <Setter Property="Background" Value="White"/> </Style> </s:SciChartSurface.GridLinesPanelStyle> <s:SciChartSurface.XAxis> <s:NumericAxis ... DrawMajorBands="False" /> </s:SciChartSurface.XAxis> <s:SciChartSurface.YAxis> <s:NumericAxis ... DrawMajorBands="False" /> </s:SciChartSurface.YAxis> <s:SciChartSurface.RenderableSeries> <s:FastHeatMapRenderableSeries ... Opacity="0.8"> </s:FastHeatMapRenderableSeries> </s:SciChartSurface.RenderableSeries> </s:SciChartSurface>
You can try this out in the “HeatMap with Text” example.
Please let us know if applying these changes works for you as well. If not, may I ask you to send us a small sample which reproduces the issue for investigation?
Thanks for the reply. I tried what you suggested but I keep getting the black background. I’m pretty sure I’m doing something wrong.
I attach a small working sample.
I am using v188.8.131.5246
I have tried again the changes Yuriy suggested, using the sample “Heatmap with Text”. In order to get NaN, I added a line of code to the data filling that if index y == x just add double.NaN to the position.
I am not getting the same result as Yuriy’s image (I attach an image showing this).
I see either three reasons to why this is the case:
1) Yuriy changed something else that wasn’t notified in the answer (something other than turning off bands and setting GridLinePanel background to white).
2) You are using a different DLL version than the latest stable release that has corrected this behavior.
Thank you very much.
I was just about to post a new answer.
I believe the issue is in version v4.0.5. During the weekend I tested the Nightly Build and got the results you showed on the image in the SciChart sample.
Unfortunately, I’m not able to download from NuGet within my company, reason why I didn’t tried the latest DLLs sooner.
I’m pending on testing the latest DLLs on my actual project but I feel confident that the issue will be solved. Once I find how to get those without using Nuget or having to download them from myget.com I’ll test them ASAP and close this thread.
Please login first to submit.