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

Welcome to the SciChart Community Forums!

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!

Answered
0
0

I’ve got a few questions about plotting Lat/Long coordinates in real time.

Situation
I’ve got two data series – (Timestamp, Latitude) & (Timestamp, Longitude) being updated 10 times/second. My goal is to graph car position in real time with a ScatterRenderableSeries and color each point according to other channels of data (temp, brake pressure, yaw rate, etc..).

How to best associate metadata?
In order to color the plotted points I need to be able to associate them with their respective timestamps. Do you have any advice on how best to do so? It seems the most obvious solution is using the PointMetaData API, but I’m curious if there would be a more efficient solution (like say somehow using an Xyz/Xyy DataSeries).

Dealing with the unsorted nature of the data?
I’m aware that SciChart performs much better when only inserting sorted data into a XyDataSeries. Seeing as I only receive GPS data 10 times/sec, I’m wondering if you think the lost performance will still pose a problem?

I’d appreciate any advice you could give!

Version
4.2.2.9744
  • You must to post comments
Best Answer
1
0

Hi Paul

You can indeed use XyzDataSeries to plot to a scatter chart. The Scatter chart itself will output the position according to the X,Y values. Any paletteProvider you attach accepts the RenderableSeries and index to the data, so you can cast to XyzDataSeries and get the Z-value.

However, if you want to output Z values in tooltips, then with a scatter series you’re only going to get XySeriesInfo. This is a bit of a problem. To show the Z value in a tooltip you would need to hack our hit-test a bit by overriding the HitTest function and returning an XyzSeriesInfo instead with the Z value included. This is why Metadata is a superior solution allowing you to include more data with the point. How many cars are we talking about? Should be OK with tens of thousands, even more.

For scatter series data is always treated as unsorted because scatter series are by their very nature: unsorted. Still we have examples demonstrating scatter series drawing up to a million points at interactive frame rates.

Best regards,
Andrew

  • Paul Frivold
    Thank you Andrew! Only dealing with a single car, but probably something like 20,000 datapoints. Will give this a try!
  • Andrew
    Glad to be of help!
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.