SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
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
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
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
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)
Please login first to submit.