Pre loader

Sci chart real ime graph plotting with x axis-date and time

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

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.

Try SciChart Today

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

Start TrialCase Studies