Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Question about sample data part in chart examples
Question about sample data part in chart examples [message #908894] Thu, 06 September 2012 03:31 Go to next message
moritz du is currently offline moritz du
Messages: 98
Registered: February 2010
Member
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. )
Re: Question about sample data part in chart examples [message #909209 is a reply to message #908894] Thu, 06 September 2012 14:28 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Sample data is not required. That is used in the chart builder to show data in the preview before connecting to real data. I am not sure this is covered in the chart faq, but it does contain a lot of data.
http://wiki.eclipse.org/BIRT/FAQ/Charts2.2

Jason
Re: Question about sample data part in chart examples [message #909440 is a reply to message #909209] Fri, 07 September 2012 02:32 Go to previous messageGo to next message
moritz du is currently offline moritz du
Messages: 98
Registered: February 2010
Member
thx,

so this code is not needed in most of examples? at least i will delete in my code.
Re: Question about sample data part in chart examples [message #909717 is a reply to message #909440] Fri, 07 September 2012 12:31 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

That is correct. If you use the chart builder outside of BIRT you would want it.

Jason
Previous Topic:Set excel data type
Next Topic:birt report
Goto Forum:
  


Current Time: Sat Jul 26 15:33:47 EDT 2014

Powered by FUDForum. Page generated in 0.02278 seconds