Hi All,
This is a very similar issue to the following forum entry – the only difference being that I’m using a StackedColumnRenderableSeries rather than a FastColumnRenderableSeries :
I gathered from the above that there may be a problem with small data values but I’ve been using a set of test points ranging in value from 10 to 50 (although ultimately i’ll be using values in the e-5 range) and have tried setting the ZeroLineY value as suggested but to no avail. Following Nazar’s comments in the other forum entry, it seems there is something to do with calculating a value from the column width and I’m wondering if the side-by-side nature of the StackedColumnRenderableSeries has something to do with the problem.
I put a single series on the chart and it displays as expected – all I then do is change the axis type in the XAMl as follows:
<!-- WORKING but obviously doesn't display in log format -->
<s:SciChartSurface.YAxis>
<s:NumericAxis AutoRange="Always" AxisAlignment="Left" AxisTitle="Pressure" ScientificNotation="E" TextFormatting="#.#E+0" CursorTextFormatting="#.#E+0" GrowBy="0.0, 0.1"/>
</s:SciChartSurface.YAxis>
<!-- NOT WORKING creating blank chart devoid of even the gridlines -->
<s:SciChartSurface.YAxis>
<s:LogarithmicNumericAxis AutoRange="Always" AxisAlignment="Left" AxisTitle="Pressure" TextFormatting="#.#E+0" CursorTextFormatting="#.#E+0" GrowBy="0.0, 0.1"/>
</s:SciChartSurface.YAxis>
I’m on version 3.4.0.6319 – I’ve just realized that one of my last posts was fixed by a later release and I should have checked that first. oh well, I’m here now!!!
Any ideas anyone?
/Stu
- Stuart McCullough asked 9 years ago
- You must login to post comments
Posting an answer so I can include some code:
Hi Andrew,
Ok – finally got that version and it seems to solve the problem as long as all the numbers are positive. It’s still not keen on negative numbers and I’m still failing to see what effect ZeroLineY is having on anything I’m afraid.
if I change the dataSeries in my example solution to the following:
private void AddData_Click(object sender, RoutedEventArgs e)
{
newStackedSeries.StackedGroupId = "Demo";
// Colour and Size the groups bars
newStackedSeries.SeriesColor = Colors.Red;
SolidColorBrush colorBrush = new SolidColorBrush();
colorBrush.Color = Colors.Red;
newStackedSeries.FillBrush = colorBrush;
newStackedSeries.DataPointWidth = 0.9;
int startX = 1;
int endX = 50;
// Create a data series and attach to the StackedSeries
var newDataSeries = new XyDataSeries<int, double> { SeriesName = "Test Series" };
for (int x = startX; x <= endX; x++)
{
newDataSeries.Append(x, x - 10);
}
newStackedSeries.DataSeries = newDataSeries;
newStackedSeries.YAxisId = "LinearLeft";
newStackedSeries.ZeroLineY = 1;
ChartSurface.RenderableSeries.Add(newStackedSeries);
ChartSurface.XAxis.VisibleRange = new DoubleRange(startX, endX);
}
…..so it now includes negative numbers. If I now swap to the log axis I get the same result i.e. the chart is blank. As you see I’ve set the ZeroLineY as a positive number but even if I remove this I get the same result. I was expecting it to ignore every value below the ZeroLineY Value (not sure what it will display for this though)
- Stuart McCullough answered 9 years ago
-
Hi Andrew/Yuriy - Is anybody looking at this still? I suspect that as I posted an answer it may have fallen off your radar and I really need to get to the bottom of this negative numbers issue :-(
-
Hi Stuart, sorry for our belated reply. We've just missed this thread among other support requests. So concerning your questions, the chart goes blank probably because you have exceptions turned off in Visual Studio. There must be an exception being thrown every time. The reason for it is the fact that you should not have negative or zero data values shown with LogarithmicNumericAxis. And as to ZeroLineY, it is used not to prevent some values from being drawn, but to indicate the bottom line for columns. It is set to "0" by default, and should be reset to any small positive value if the logarithmic axis is used. Hope it is a bit clearer now!
-
Aha! so I basically need to sort this out at the source data level rather than hoping SciChart will do all the work for me! I was expecting this to be honest but wanted to be armed with all the information for when "certain parties" come back with the usual "why do we have to do that thinking decision making thing, doesn't SciChart do it all for us?" argument. Thank you Yuriy, thats a good enough answer for me.
- You must login to post comments
Hi Yuriy,
Sorry for the delay in responding – for some reason I didn’t get my usual email notification when you posted your comment.
I’ve attached a DevStudio project which shows the issue in all it’s glory and roughly reflects how we use it i.e. the code behind creates a series and adds it.
The app creates two axis, a linear and a log one – use the add test data button while it’s ticked and it will create a visible series on the linear scale. Unchecking the checkBox moves the series onto the Log axis and the chart contents fail to render.
As an additional observation – when you try to force the series back onto the linear axis everything is still gone (i wouldn’t have noticed this in our actual implementation as there is no requirement to swap between axis).
Have Fun
/Stu
- Stuart McCullough answered 9 years ago
-
Hi Stuart, thank you for the sample. Please try out build #v3.4.2.6545 and let us know if it works as expected. BTW, in your sample, you should set YZeroLine to any value >0 to prevent it from crashing.
-
Hi Yuri, I'm having trouble with getting that version. I can download 3.4.1.6431 but that's it. The "Setup NuGet" link is timing out and the link to "ABT Software Nuget Feed" is resulting in a page not available. A quick question about YZeroLine (or ZeroLineY as intellisense is giving me): Is this just telling SciChart to ignore any values in the dataseries that are less than this value when rendering the chart? We would have to set this down at the e-10 sort of level.
-
Hi Stuart. Check out https://www.scichart.com/scichart-nuget-feed-reliability-update/ which links to our secondary NuGet feed here: https://www.myget.org/gallery/abtsoftware. Feed URL is https://www.myget.org/F/abtsoftware/api/v2. You can follow the instructions from here to setup the NuGet feed and pull any version http://gregorsuttie.com/2011/01/03/using-a-nuget-local-repository/ Best regards, Andrew
- You must login to post comments
Hi Stuart,
Thanks for reporting this. We’ve managed to reproduce the issue on our side, but haven’t had a chance to investigate it yet.
However, It has been logged to our bug tracker and we are going to take a look. I will update this thread when the issue is fixed or any workaround found,
Best regards,
Yuriy
- Guest answered 9 years ago
-
Hi Yuriy, thanks for confirming that there is an issue - it's nice to occasionally find that you are neither mad or stupid and there is an actual problem there that isn't of your own doing for once :-) My current solution is to convert the series data to the Log value before display - but the customer doesn't like it. Hopefully you'll get a fix soon though. :-)
-
You are welcome! :) By the way, may I ask you to send us a small sample which reproduces this? We've discovered a couple of issues with ZoomExtents and ZeroLineY, but series are always visible. So maybe there is another one we aren't aware of yet. A sample would be a great help in order to find and investigate the issue.
- You must login to post comments
Please login first to submit.