#74 How to control the bar colors in charts

closed
nobody
None
5
2005-02-23
2004-02-14
JLow
No

I want to assign the colors I want to the bars of a
chart. How can I do it?

Thanks in advance.

Discussion

  • Anthony Communier

    Logged In: YES
    user_id=795301

    You can make your own ChartPostProcessor (I only try to
    change the tick unit but it should be ok for colors)

    with

    XXXRenderer renderer = (XXXRenderer) plot.getRenderer();
    renderer.setSeriesPaint(0, Color.red);

    In your JSP :

    <cewolf:chart
    id="graph"
    type="verticalbar"
    xaxislabel="Heure"
    yaxislabel="Valeurs">
    <cewolf:data>
    <cewolf:producer id="graphProducer">
    <cewolf:param ........ />
    </cewolf:producer>
    </cewolf:data>
    <cewolf:chartpostprocessor id="postProducer">
    <cewolf:param ...../>
    </cewolf:chartpostprocessor>
    </cewolf:chart>

     
  • Brian Fox

    Brian Fox - 2005-02-23
    • status: open --> closed
     

Log in to post a comment.