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 am trying to use SciChart library for my project and find out whether it satisfy all requirements.
I am currently trying to display the ECG signal. Therefore the data is coming in realtime.
I have the following configuration
final NumericAxis xAxis = mSciChartBuilder .newNumericAxis() .withAxisTitle("Time (seconds)") .withDrawLabels(false) .withDrawMajorTicks(false) .withDrawMinorTicks(false) .withDrawMajorBands(false) .withDrawMajorGridLines(false) .withDrawMinorGridLines(false) // .withVisibleRange(0, 2040) .withAutoRangeMode(AutoRange.Always) //.withAutoRangeMode(AutoRange.Never) .build(); final NumericAxis yAxis = mSciChartBuilder .newNumericAxis() .withAxisTitle("Voltage (mV)") // .withGrowBy(0.1d, 0.1d) .withDrawLabels(false) .withDrawMajorTicks(false) .withDrawMinorTicks(false) .withDrawMajorBands(false) .withDrawMajorGridLines(false) .withDrawMinorGridLines(false) .withVisibleRange(Short.MIN_VALUE, Short.MAX_VALUE) .build();
It works but the X axis a little bit scaled/compress.
Here is the result
enter image description here
I need to make it a bit wider.
How can I do this ?
I have tried to set range manually like that
However in this case it doesn’t show anything.
I would be grateful for any help.
You set for xAxis has AutoRange.Always which will override any changes to VisibleRange and scale axis to data extents. As I see from your screenshot line series is drawn horizontally to the right side of the screen so probably there is some data point at the end of the line and that’s why AutoRange.Always provide such result.
If you want to set VisibleRange manually then you should use AutoRange.Never or AutoRange.Once and provide desired VisibleRange:
final NumericAxis xAxis = mSciChartBuilder .newNumericAxis() .withAutoRangeMode(AutoRange.Never) .withVisibleRange(0, 2040) .build();
Hope this will help you!
Please login first to submit.