Menu

#1098 RadialGradientPaint with MultiplePiePlot is not radiall

open
nobody
General (896)
5
2012-11-27
2012-09-26
sandstones
No

Using a RadialGradientPaint with a MultiplePiePlot, one would expect that the radial gradient applies to each pie plot, so that the gradient looks radial inside of each pie plot. Instead, the gradient is applied to the entire plot area, which has the effect of making the same slice of pie a different shade in the different pies.

In the attached plot

Discussion

  • sandstones

    sandstones - 2012-09-26
     
  • sandstones

    sandstones - 2012-09-26

    Was going to say that in the attached plot, the darker shades should be in the middle of each pie; instead the darker shades are in the middle of the whole plot, and for example, the light brown and yellow slices, which should be the same color, are looking very different.

     
  • Source Dave

    Source Dave - 2012-10-17

    Firstly,
    if you don't take the time to attach an Image that actually looks like a RadialGradientPaint...
    ...then don't be surprised that your posting is not taken seriously.
    See here for some examples
    http://docs.oracle.com/javase/6/docs/api/java/awt/RadialGradientPaint.html

    Secondly,
    my superficial understanding of how JFreeChart paints, is that it depends where the Canvas is defined for each object being painted & all objects probably share the same Canvas & are clipped to paint only the required object & it actually makes sense the way JFreeChart does it, because different Objects using the same GradientPaint but different colours will show continuity in form & a transition in colour. The same is true of Image Paints: it actually looks really good if a large Image extends over several Bars in a 3DBarChart (particularly when my JFreeChart PaintAlpha Patch becomes generally available, which allows 3D effects with various Paint's, including Images). See here for details of that:
    https://sourceforge.net/tracker/?func=detail&aid=3204823&group_id=15494&atid=315494

     
  • sandstones

    sandstones - 2012-10-30

    I have come up with a fix that calculates the center of the plot and recalculates the radial gradient for each sub-plot. Based it on another comment about radial plots from a few years ago. Is there a method to feed that back?

     

Log in to post a comment.