Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Error on setMax using DateTimeDataSet series
Error on setMax using DateTimeDataSet series [message #630345] Fri, 01 October 2010 16:28 Go to next message
No real name is currently offline No real name
Messages: 23
Registered: August 2010
Junior Member
Hello,
I am using DateTimeDataSet on my XAxis using the following code:
// X-Axis
Axis xAxisPrimary = ((ChartWithAxes) chart).getPrimaryBaseAxes()[0];

xAxisPrimary.setType(AxisType.DATE_TIME_LITERAL);
xAxisPrimary.getOrigin().setType(IntersectionType.MIN_LITERA L);
xAxisPrimary.setTitlePosition(Position.BELOW_LITERAL);
xAxisPrimary.getLabel().getCaption().getFont().setRotation(7 5);
xAxisPrimary.setLabelPosition(Position.BELOW_LITERAL);

xAxisPrimary.getMajorGrid().setTickStyle(TickStyle.BELOW_LIT ERAL);
xAxisPrimary.getMajorGrid().getLineAttributes().setStyle(Lin eStyle.DOTTED_LITERAL);
xAxisPrimary.getMajorGrid().getLineAttributes().setColor(Col orDefinitionImpl.create(64, 64, 64));
xAxisPrimary.getMajorGrid().getLineAttributes().setVisible(t rue);

DateTimeDataSet categoryValues = DateTimeDataSetImpl.create(new
CDateTime[] { new CDateTime(2010, 7, 2), new CDateTime(2010, 7, 6)});
//xAxisPrimary.getScale().setAutoExpand(false);
xAxisPrimary.setCategoryAxis(true);
// X-Series
Series seCategory = SeriesImpl.create();
seCategory.setDataSet(categoryValues);

SeriesDefinition sdX = SeriesDefinitionImpl.create();
xAxisPrimary.getSeriesDefinitions().add(sdX);
sdX.getSeries().add(seCategory);


Now when I try to update the max scale using:
xScale.setMax( DateTimeDataElementImpl.create(new CDateTime(2010, 7, 5)));

I get the following error:
java.lang.VerifyError: (class: com/axioma/pa/ui/report/chart/ChartCanvas$4, method: widgetSelected signature: (Lorg/eclipse/swt/events/SelectionEvent;)V) Incompatible argument to function


Can you please point out what I am missing in the code to update the max scale?

Thanks,
Re: Error on setMax using DateTimeDataSet series [message #630373 is a reply to message #630345] Fri, 01 October 2010 19:08 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I do not see anything obvious wrong with this. From the source here is
an example snippet that is used on the y axis with a gantt chart:

// Y-Axis
Axis yAxisPrimary = cwaGantt.getPrimaryOrthogonalAxis( xAxisPrimary );
yAxisPrimary.setType( AxisType.DATE_TIME_LITERAL );
yAxisPrimary.getMajorGrid( ).setTickStyle( TickStyle.LEFT_LITERAL );
yAxisPrimary.getScale( ).setMin( DateTimeDataElementImpl.create( new
CDateTime(2008,1,1) ) );
yAxisPrimary.getScale( ).setMax( DateTimeDataElementImpl.create( new
CDateTime(2009,1,1) ) );
DateFormatSpecifier dfs =
AttributeFactory.eINSTANCE.createDateFormatSpecifier( );
dfs.setDetail( DateFormatDetail.DATE_LITERAL );
dfs.setType( DateFormatType.MEDIUM_LITERAL );
yAxisPrimary.setFormatSpecifier( dfs );

Jason

On 10/1/2010 12:28 PM, asadanandan@axiomainc.com wrote:
> Hello,
> I am using DateTimeDataSet on my XAxis using the following code:
> // X-Axis
> Axis xAxisPrimary = ((ChartWithAxes) chart).getPrimaryBaseAxes()[0];
>
> xAxisPrimary.setType(AxisType.DATE_TIME_LITERAL);
> xAxisPrimary.getOrigin().setType(IntersectionType.MIN_LITERA L);
> xAxisPrimary.setTitlePosition(Position.BELOW_LITERAL);
> xAxisPrimary.getLabel().getCaption().getFont().setRotation(7 5);
> xAxisPrimary.setLabelPosition(Position.BELOW_LITERAL);
>
> xAxisPrimary.getMajorGrid().setTickStyle(TickStyle.BELOW_LIT ERAL);
> xAxisPrimary.getMajorGrid().getLineAttributes().setStyle(Lin
> eStyle.DOTTED_LITERAL);
> xAxisPrimary.getMajorGrid().getLineAttributes().setColor(Col
> orDefinitionImpl.create(64, 64, 64));
> xAxisPrimary.getMajorGrid().getLineAttributes().setVisible(t rue);
>
> DateTimeDataSet categoryValues = DateTimeDataSetImpl.create(new
> CDateTime[] { new CDateTime(2010, 7, 2), new CDateTime(2010, 7, 6)});
> //xAxisPrimary.getScale().setAutoExpand(false);
> xAxisPrimary.setCategoryAxis(true);
> // X-Series
> Series seCategory = SeriesImpl.create();
> seCategory.setDataSet(categoryValues);
>
> SeriesDefinition sdX = SeriesDefinitionImpl.create();
> xAxisPrimary.getSeriesDefinitions().add(sdX);
> sdX.getSeries().add(seCategory);
>
>
> Now when I try to update the max scale using:
> xScale.setMax( DateTimeDataElementImpl.create(new CDateTime(2010, 7, 5)));
>
> I get the following error:
> java.lang.VerifyError: (class:
> com/axioma/pa/ui/report/chart/ChartCanvas$4, method: widgetSelected
> signature: (Lorg/eclipse/swt/events/SelectionEvent;)V) Incompatible
> argument to function
>
>
> Can you please point out what I am missing in the code to update the max
> scale?
>
> Thanks,
Previous Topic:Export/Print from Chart API
Next Topic:BIRT Viewer 2.5.1 ISSUE
Goto Forum:
  


Current Time: Thu Oct 30 13:43:18 GMT 2014

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

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