3

I have developed a bar chart using achartengine library. Achartengine is rendering the blank values of the series and creating undesired spaces, how to remove that? Does anyone knows how to stop that?? In the image green , yellow and red colored bar showing the data on the basis of customisation , I have used mutiple series for one dataset, at jan , i have values of green bar only and blank values for yellow and red, achartengine was not supposed to render chart for them, but its still doing that..HOW TO STOP THAT???

1 Answers1

0

There are a couple of things you could do:

  • Use renderer.setBarSpacing(0);
  • If the above only is not working then make sure none of the series has exactly one item. If this happens then just add an empty bar or one with MathHelper.NULL_VALUE as the value
Dan D.
  • 32,246
  • 5
  • 63
  • 79
  • I tried using MAthhelper.null values , in that case all my points sticks to bottom , i can show you the screenshot, – user2190720 May 07 '13 at 07:49
  • What version of ACE are you using? – Dan D. May 07 '13 at 07:54
  • I suggest you make the chart work with all series having 2 or more items and then get to this edge case. – Dan D. May 07 '13 at 07:55
  • http://stackoverflow.com/questions/16355225/achartengine-xymultipleseriesrenderer-renderes-chart-for-null-values-and-shows-u – user2190720 May 07 '13 at 07:57
  • 1
    Just update to 1.1.0. Get it here: https://repository-achartengine.forge.cloudbees.com/snapshot/org/achartengine/achartengine/1.1.0/ – Dan D. May 07 '13 at 07:59
  • I suggest you make the chart work with all series having 2 or more items and then get to this edge case. – Dan D. May 07 '13 at 08:04
  • I have done that only..http://stackoverflow.com/questions/16355225/achartengine-xymultipleseriesrenderer-renderes-chart-for-null-values-and-shows-u.. this is my code – user2190720 May 07 '13 at 08:05
  • :I tried it with the new version and without using Mathhelper class, its still giving the same result, I mean engine is still rendering blank values and creating undesired spacing?? – user2190720 May 07 '13 at 08:08
  • Did you follow my suggestion above? – Dan D. May 07 '13 at 08:33
  • :I don't understand what impression you have, truns out you are passing such a comment...No hard feelings Thanks a lot for your time – user2190720 May 07 '13 at 09:35