09.04.2018 Views

tornadofx-guide

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8. Charts<br />

ScatterChart<br />

A ScatterChart is the simplest representation of an XY data series. It plots the points<br />

without bars or lines. It is often used to plot a large volume of data points in order to find<br />

clusters. Here is a brief example of a ScatterChart plotting machine capacities by week for<br />

two different product lines (Figure 8.5).<br />

scatterchart("Machine Capacity by Product/Week", NumberAxis(), NumberAxis()) {<br />

series("Product X") {<br />

data(1,24)<br />

data(2,22)<br />

data(3,23)<br />

data(4,19)<br />

data(5,18)<br />

}<br />

series("Product Y") {<br />

data(1,12)<br />

data(2,15)<br />

data(3,9)<br />

data(4,11)<br />

data(5,7)<br />

}<br />

}<br />

Figure 8.5<br />

128

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!