Support #8526

Widget example code for Constellation plot

Added by Someshwar DK over 1 year ago. Updated over 1 year ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


Hello Team,

I am in process of building a Frontend for displaying statistics from our backend server.

I receive data for plotting constellation on the cartesian plane. With Scatter-Plot, I see that the (x,y) coordinates connect with a line, but with our requirement, we only want the coordinate dots to be plotted.

Attaching an example output to get as Red dots,

Please help me with below,

  1. Is it possible to plot dots as above?
  2. Which widget do I use to achieve this? Please point me to some documentation
  3. Please point me to some example code for plotting the constellation



clipboard-202105171524-rbq1b.png (57.4 KB) clipboard-202105171524-rbq1b.png Someshwar DK, 05/17/2021 11:54 AM
constellation.gif (6.44 KB) constellation.gif Example of live plot of constellation points Someshwar DK, 05/19/2021 07:19 AM

Updated by Korneel Dumon over 1 year ago

Yes, this is possible, have a look at the documentation for WDataSeries. More specifically

  • setType() allows you to plot points without lines
  • setMarker() / setMarkerSize() allows you to make big circle markers
  • setLabelsEnabled() for the labels

There is pretty extensive charts example here: The source code for this is included in Wt.


Updated by Someshwar DK over 1 year ago

Thanks for your prompt response. I will check out the examples, class and the mentioned routines.



Updated by Someshwar DK over 1 year ago

Hello Korneel,

I was able to get the above plot using the example you pointed out.

I have a few more questions,

  1. Can the constellation points on the Cartesian plane be updated periodically and be shown as a Live plot?
  2. The example uses WStandardItemModel class to take in 40 coordinates and plot them. Can we periodically call WCartesian::setModel() routine to show new plotted points in the chart?

Basically, we keep getting new coordinates from the backend 4/5 times in a second and we want the Frontend to keep refreshing/updating whenever new data is loaded. We want to show the latest data and keep refreshing it to show as a Live updating Chart.

Please suggest the right approach.



Updated by Korneel Dumon over 1 year ago


nice to see it's working for you. You can do live updates with server-push. See WApplication::enableUpdates() for some documentation. There is also an example called serverpush.


Updated by Someshwar DK over 1 year ago

I was able to use the below routines to update the data-set and see the Chart getting updating Live,



Also available in: Atom PDF