SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0
0

Hi,

I am using Sci chart library to plot the heart rate monitor graph.
I followed tutorials till 06 Tutorial and am able to draw graph with static data.
But as for plotting HRM graph I need, x axix to display current date and time and y-axix displaying BPM.

I tried to use ==>
final IAxis xAxis = sciChartBuilder.newDateAxis()
in my application , but when am executing it getting crashed.

Would anyone help how can I achieve this . Any help will be greatly appreciated.

Thanks,
Sushmita

Version
API 23
  • You must to post comments
0
0

Hi Sushmita Ghan,

If you’re using our tutorials as a base then you should also update TX type for data series to use DateAxis. In tutorial they are declared like this so they can be used with NumericAxis as xAxis:

final XyDataSeries lineData = sciChartBuilder.newXyDataSeries(Integer.class, Double.class).build();
final XyDataSeries scatterData = sciChartBuilder.newXyDataSeries(Integer.class, Double.class).build();

And DateAxis requires Date values – so you need to declare TX as Date and append Dates:

final XyDataSeries<Date, Double> lineData = sciChartBuilder.newXyDataSeries(Date.class, Double.class).build();
final XyDataSeries<Date, Double> scatterData = sciChartBuilder.newXyDataSeries(Date.class, Double.class).build();

Hope this will help you!

Best regards,
Yura

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.