SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
————————————————————————————————————————————–
The whole issue emerged as result of negative values input in Logarithmic scale mode.
Many thanks to ABT’s support for pointing out the source of the issue!
—————————————————————————————————————————-
Hi,
Our company owns a license for SciChart.
While trying to implement logarithmic axis behavior in Real time FIFO chart, we have encountered several problems (v2.2.3322 and also v2.2.3441)
In attempt to demonstrate the issues we are facing,
I’ve done some minor modifications to the code to RealtimeFifoChartView (both .xaml and .cs files) in the Abt.Controls.SciChart.Example solution.
(The aforementioned files can be found in the attached zip archive).
Data Set Initialization (in: RealtimeFifoChartView.cs)
The data is loaded from a .csv file named “data.csv” (can be found in the attached zip archive),
The file represents a DataSet.
Y-Axis values are in the range of (1.0E-12, 1.0E-1).
New InitChart(…) Method, in row: 172
public void InitChart() { var reader = new StreamReader(File.OpenRead(@"C:\data.csv")); var xValues = new List<double>(); var yValues = new List<double>(); while (!reader.EndOfStream) { var line = reader.ReadLine(); if (line != null) { var values = line.Split(','); xValues.Add(Convert.ToDateTime(values[0]).ToFileTime()); yValues.Add(Convert.ToDouble(values[1])); } } series0.Append(xValues, yValues); }
New InitChart(…) method invoked from OnExampleEnter(…) method, in row: 168
public void OnExampleEnter() { ResetButton_Click(this, null); InitChart(); _startDelegate = TimedMethod.Invoke(() => StartButton_Click(this, null)).After(500).Go(); }
The chart generated before making further changes:
RT_FIFO_NumericAxis.png (attachment #3 file)
Issue #1:
In RealtimeFifoChartView.xaml, row: 39
After Changing NumericAxis to LogarithmicNumericAxis, Chart isn’t scaled correctly (AutoRanged)
(Y values range is (1.0E-12, 1.0E-1), and AutoRange=”Always”) and data isn’t visible.
RT_FIFO_LogarithmicAxis.png (attachment #2)
Issue #2:
In attempt to bypass the scaling (AutoRange) issue, I’ve tried controlling the VisibleRange myself, however the resulting chart is distorted and most of the date is missing.
In RealtimeFifoChartView.xaml, row: 39
VisibleRange=”1.0E-12, 1.0E-1″ Property added to Chart declaration:
RT_FIFO_LogarithmicAxis_CustomVisbleRange.png (attachment #1)
I would be grateful if you could tell me if I’m doing something wrong, or otherwise suggest another solution to present the data in “data.csv” in a Y-Axis Logarithmic scale.
Best Regards.
Cherp Mark.
Hi Mark,
The data in the attached .csv file contains negative values. Currently we don’t support rendering negative data by the logarithmic axis. However, we are always open to suggestions in order to make SciChart better and to cover most use cases, so could I ask you, what is the desired behavior and expected look? Which numbers should the axis show? Maybe you can post some screenshots or point us to some chart samples…
We appreciate your help very much.
Best regards,
Yuriy
Please login first to submit.