Smoothie Scatter Chart possible?

177 views
Skip to first unread message

CheeKiang Goh

unread,
Sep 25, 2017, 2:29:05 AM9/25/17
to Smoothie Charts
Hi, I am new to this JS ...

am looking for a fast way to display scatter plot in real time to display data points I captured via websocket. 

So... I got the websocket part settled and was able to deliver the data to the respective charting JS... here is the pain I experienced in the past:

with Scatter plot rendering on SVG, it is painfully slow. I cannot render more than 5-10 times a second without choking the display or the browser.

This I have tried with CanvasJS, and flot to some degree of success but always not very satisfied with the rendering speed

 (based on the google-chrome profiler, the time is really spent on the rendering of the charts)... 

I am not interested in fills or lines or any thing pretty.. just the scatter points. 

and when I move to a unix environment (behind Firewall unfortunately), it slow down to a crawl for even a very simple stream.

So I am looking into this one now... and am hoping that I can get your expert opinions to jumpstart on this.

Sincerely appreciate your kind advice.

PS: I could resort to QT for a better rendering engine... but thought that a JS based solution would be more platform independent... as such very willing to try things if they are in the right direction. thanks for your sharing!


Best Regards
Chee Kiang

Steven R

unread,
Oct 25, 2018, 3:37:51 PM10/25/18
to Smoothie Charts
bump. Does anyone in the Smoothie.js community know if this possible in Smoothie.js? Or has anyone used a good alternative for scatterplots using websockets? 

Cameron Tacklind

unread,
Oct 25, 2018, 4:13:07 PM10/25/18
to Smoothie Charts
At it stands, I think this is not possible.

However it looks like this would be a trivial feature to add.

https://github.com/joewalnes/smoothie/blob/master/smoothie.js#L929 is where the `interpolation` is used. If you add a new possible value, say "scatter", I bet it would be as simple as using context.moveTo(x, y); instead of context.lineTo(x,y);

Steven R

unread,
Feb 6, 2019, 12:05:15 PM2/6/19
to Smoothie Charts
I will open a pull request for this. 
Reply all
Reply to author
Forward
0 new messages