use of com.vaadin.addon.charts.model.DataSeriesItem3d in project charts by vaadin.
the class WaterfallChartExample method item.
public DataSeriesItem item(int x, int y, int z) {
DataSeriesItem3d dataSeriesItem = new DataSeriesItem3d();
dataSeriesItem.setX(x);
dataSeriesItem.setY(y);
dataSeriesItem.setZ(z);
return dataSeriesItem;
}
use of com.vaadin.addon.charts.model.DataSeriesItem3d in project charts by vaadin.
the class Basic3DScatter method fillSeries.
private void fillSeries(DataSeries higherX, DataSeries higherY, DataSeries higherZ) {
Random random = new Random(7);
for (int i = 0; i < 300; i++) {
double lng = random.nextDouble() * 2 * Math.PI;
double lat = random.nextDouble() * Math.PI - Math.PI / 2;
double x = Math.cos(lat) * Math.sin(lng);
double y = Math.sin(lat);
double z = Math.cos(lng) * Math.cos(lat);
DataSeriesItem3d point = new DataSeriesItem3d(x, y, z);
if (x > y && x > z) {
higherX.add(point);
} else if (y > x && y > z) {
higherY.add(point);
} else {
higherZ.add(point);
}
}
}
use of com.vaadin.addon.charts.model.DataSeriesItem3d in project charts by vaadin.
the class BubbleChartExample method item.
public DataSeriesItem item(int x, int y, int z) {
DataSeriesItem3d dataSeriesItem = new DataSeriesItem3d();
dataSeriesItem.setX(x);
dataSeriesItem.setY(y);
dataSeriesItem.setZ(z);
return dataSeriesItem;
}
use of com.vaadin.addon.charts.model.DataSeriesItem3d in project charts by vaadin.
the class BasicUse method basicUse3dDistanceSnippet2.
public void basicUse3dDistanceSnippet2() {
double x = 3.2;
double z = 3.3;
double y = 2.3;
Options3d options3d = new Options3d();
DataSeriesItem3d item = new DataSeriesItem3d(x, y, z * options3d.getDepth().doubleValue());
double distance = 43.2;
// Grayness
int gr = (int) (distance * 75);
Marker marker = new Marker(true);
marker.setRadius(1 + 10 / distance);
marker.setFillColor(new SolidColor(gr, gr, gr));
item.setMarker(marker);
DataSeries series = new DataSeries();
series.add(item);
}
use of com.vaadin.addon.charts.model.DataSeriesItem3d in project charts by vaadin.
the class ThreeDAxisConfiguration method fillSeries.
private void fillSeries(DataSeries higherX, DataSeries higherY, DataSeries higherZ) {
Random random = new Random(7);
for (int i = 0; i < 300; i++) {
double lng = random.nextDouble() * 2 * Math.PI;
double lat = random.nextDouble() * Math.PI - Math.PI / 2;
double x = Math.cos(lat) * Math.sin(lng);
double y = Math.sin(lat);
double z = Math.cos(lng) * Math.cos(lat);
DataSeriesItem3d point = new DataSeriesItem3d(x, y, z);
if (x > y && x > z) {
higherX.add(point);
} else if (y > x && y > z) {
higherY.add(point);
} else {
higherZ.add(point);
}
}
}
Aggregations