java - 3d Cylinder Bar Chart with Jfreechart -


i need make 3d cylinder bar chart jfreechart shown in picture on link: http://www.jzy3d.org/gallery/web/demo-histogram.png . have problems on 2 lines of code: chart.getaxelayout().setmaincolor(color.white); , chart.getview().setbackgroundcolor(color.black);, both in main method. know problem here?

thanks in advance

import java.awt.color;  import org.jzy3d.chart.chart; import org.jzy3d.chart.chartlauncher; import org.jzy3d.colors.colormapper; import org.jzy3d.colors.colormaps.colormaprainbow; import org.jzy3d.maths.coord3d; import org.jzy3d.plot3d.primitives.multicolorscatter;  public class chart  {     int size = 100000;     float x;     float y;     float z;     public void crtaj()     {         coord3d[] points = new coord3d[size];          // create scatter points         for(int i=0; i<size; i++){             x = (float)math.random() - 0.5f;             y = (float)math.random() - 0.5f;             z = (float)math.random() - 0.5f;             points[i] = new coord3d(x, y, z);         }                 // create drawable scatter colormap         multicolorscatter scatter = new multicolorscatter( points, new colormapper( new colormaprainbow(), -0.5f, 0.5f ) );          // create chart , add scatter         chart chart = new chart();         chart.getaxelayout();//.setmaincolor(color.white);         chart.getview();//.setbackgroundcolor(color.black);         chart.getscene().add(scatter);         chartlauncher.openchart(chart);     }      public static void main(string[] args)     {         /*chart proba = new chart();         proba.crtaj();*/          int size = 100000;         float x;         float y;         float z;         coord3d[] points = new coord3d[size];          // create scatter points         for(int i=0; i<size; i++){             x = (float)math.random() - 0.5f;             y = (float)math.random() - 0.5f;             z = (float)math.random() - 0.5f;             points[i] = new coord3d(x, y, z);         }                 // create drawable scatter colormap         multicolorscatter scatter = new multicolorscatter( points, new colormapper( new colormaprainbow(), -0.5f, 0.5f ) );          chart chart = new chart();         chart.getaxelayout().setmaincolor(color.white);         chart.getview().setbackgroundcolor(color.black);         chart.getscene().add(scatter);         chartlauncher.openchart(chart);     } } 

in code, have imported java.awt.color. need import org.jzy3d.colors.color instead of java.awt.color. remove java.awt.color import , add import statement below:

import org.jzy3d.colors.color; 

it going work.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -