Pre loader

Can't use StackedColumnRenderableSeries used with a LogarithmicNumericAxis

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

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 :

https://www.scichart.com/questions/question/issue-with-logarithmicnumericaxis-and-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

  • You must to post comments
0
0

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

  • Stuart McCullough
    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. :-)
    • Guest
    • 9 years ago
    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 to post comments
0
0

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

  • You must to post comments
0
0

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
    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 :-(
    • Guest
    • 9 years ago
    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!
  • Stuart McCullough
    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 to post comments
Showing 3 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies