java - How to customize series fill in area chart via BIRT chart API? -
A series I have a shield an area for creating charts that I'm building through the BIRT chart API I am trying to fill, but the book "Integrated and Extended BIRT" and Interweb are eagerly curious about how it works. It does not matter what I do, I always get a flat color from the default palette. I SeriesDefinition.getSeriesPalette () Using update (gradient) and even creating your own palette with the gradient, it is installed throughout that SeriesDefinition, but there is no use. I also does not change is noticed that if I palette, even if this change (0), which will not do anything to claim Jwadoks, when I try to create charts, so I get NullPointerException: Here's what I've tried the latest (non-working) code is: So chanting magic to use my shield as filling the area to the Bert Charting API?
to java.lang.NullPointerException (Area on org.eclipse.birt.chart.render.Area.renderDataPoints on because: org.eclipse.birt.chart.render.Line.renderSeries. java: 521) (Lainkjawa:570) Org.aklipskbirtkchartkrenderkaksesrendererkrenderplot (Aksesrendererkjawa:2l8l) Org.aklipskbirtkchartkrenderkaksesrendererkrender (Aksesrendererkjawa:3l4 On) organization .eclipse.birt.chart.factory.generator.render (Generator.java:1368) ... 108 more on
slope gradient = FillUtil.createDefaultGradient (BirtReportBuilder.COLOR_WHITE); Gradient.setStartColor (ColorDefinitionImpl.WHITE ()); Gradient.setEndColor (ColorDefinitionImpl.create (76, 116, 131)); Gradient.setDirection (90); Series Definition sdY = SeriesDefinitionImpl.create (); . SdY.getQuery () setDefinition ("\" volume \ ""); Palette window = bar Impl.create (slope); Pal.shift (0); SdY.setSeriesPalette (Pal); . Add SdY.getSeries () (as1); . YAxisPrimary.getSeriesDefinitions () Adding (SDY);
This code works for me, I get an ugly colorful serie ...
sdY.getSeriesPalette (). Update (GradientImpl.create (ColorDefinitionImpl.create) (255,255,255), ColorDefinitionImpl.create (200,0,0,150), 90, false)); Hope this will help you; P
Comments
Post a Comment