Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Question about sample data part in chart examples
Question about sample data part in chart examples [message #908894] Thu, 06 September 2012 07:31 Go to next message
moritz du is currently offline moritz duFriend
Messages: 102
Registered: February 2010
Senior 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 18:28 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
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 06:32 Go to previous messageGo to next message
moritz du is currently offline moritz duFriend
Messages: 102
Registered: February 2010
Senior 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 16:31 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
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 Apr 27 01:05:10 GMT 2024

Powered by FUDForum. Page generated in 0.03602 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top