private void createChartPart(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayoutData(ExampleUtil.createFillData()); composite.setLayout(ExampleUtil.createGridLayout(1, false, true, true)); chart = new StreamChart(composite, SWT.BORDER); GridData layoutData = new GridData(SWT.FILL, SWT.DEFAULT, true, false); layoutData.heightHint = 300; chart.setLayoutData(layoutData); createItems(); update(); }
private void update() { ChartItem[] items = chart.getItems(); for (int i = 0; i < items.length; i++) { items[i].setValues(dataSet.getValuesForColumn(i)); } }