如何在Stacked3DBar中设置各个柱子块颜色

 
/**

**QQ:252574345

**MSN:[email protected]

*/         

           CategoryPlot categoryplot = (CategoryPlot)chart.getPlot();

           StackedBarRenderer3D stackedbarrenderer = (StackedBarRenderer3D)categoryplot.getRenderer();

            //对柱子的第1个块进行颜色设置

             stackedbarrenderer.setSeriesPaint(0, new Color(100,138,254));


            //对柱子的第2个块进行颜色设置             
             stackedbarrenderer.setSeriesPaint(1,  new Color(255 ,201, 77  )); 


             //对柱子的第3个块进行颜色设置            
             stackedbarrenderer.setSeriesPaint(2, new Color(255, 103 ,103 ));

 

你可能感兴趣的:(qq)