Based on the sort of data that will be shown, a chart is one of two types (the same as for 2D charts):
a CategoryChart for categorized data
a ScatterPlot for numerical data
Types of data
All data that can be shown in a 3D chart, has to derive from Chart::WAbstractDataSeries3D. Instances of this class include a model containing the actual data and all logic to draw themselves on the chart. This means all graphical features of the data (color, pointsize ...) are also part of this class.
Wt provides three built-in classes representing data:
WGridData: data lying on a grid specified by an x- and y-axis
WEquidistantGridData: data lying on a grid with an equidistant x- and y-axis
WScatterData: data containing a collection of unconstrained points
Each instance of these dataseries has a WAbstractItemModel backing them. The model for all these dataseries has to be provided as a table.
In Chart::WGridData, the table must contain one column representing the x-axis values and one row representing the y-axis values. All other values then specify the z-axis value belonging to the corresponding (x, y) pair.
The backing model for Chart::WEquidistantGridData is similar, with the difference that no x- and y-axis values are required. These can be specified directly to the class instance using setXAbscis(double XMinimum, double deltaX) and setYAbscis(double YMinimum, double deltaY).
The model for Chart::WScatterData must have three columns containing (x, y, z) values for every point.
All grid-based data has the additional feature that the visualization of the data is determined by its Series3DType, which can be either of three values:
Note that PointSeries3D and SurfaceSeries3D only apply to a chart of type ScatterPlot and BarSeries3D only applies to a CategoryChart.