Question about sample data part in chart examples [message #908894] |
Thu, 06 September 2012 03:31  |
Eclipse User |
|
|
|
most of the chart examples looking very similar and for most parts i have at least a "feeling" what they do. But in all examples their is a part that creates sample data and adds it to the chart. it looks like that:
SampleData sd = DataFactory.eINSTANCE.createSampleData();
BaseSampleData sdBase = DataFactory.eINSTANCE.createBaseSampleData();
sdBase.setDataSetRepresentation("");//$NON-NLS-1$
sd.getBaseSampleData().add(sdBase);
OrthogonalSampleData sdOrthogonal1 = DataFactory.eINSTANCE.createOrthogonalSampleData();
sdOrthogonal1.setDataSetRepresentation("");//$NON-NLS-1$
sdOrthogonal1.setSeriesDefinitionIndex(0);
sd.getOrthogonalSampleData().add(sdOrthogonal1);
OrthogonalSampleData sdOrthogonal2 = DataFactory.eINSTANCE.createOrthogonalSampleData();
sdOrthogonal2.setDataSetRepresentation("");//$NON-NLS-1$
sdOrthogonal2.setSeriesDefinitionIndex(1);
sd.getOrthogonalSampleData().add(sdOrthogonal2);
cwaBar.setSampleData(sd);
at first sight it is allway the same?! what does this do? (to prevent more of such questions: is there a documentation that explains how the charts are working, the model behind it and some other backgrounds? - most of documentations i found are click-through-eclipse-interface tutorials. )
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05823 seconds