public static ChartTheme createDarknessTheme(){
  StandardChartTheme theme=new StandardChartTheme("Darkness");
  theme.titlePaint=Color.white;
  theme.subtitlePaint=Color.white;
  theme.legendBackgroundPaint=Color.black;
  theme.legendItemPaint=Color.white;
  theme.chartBackgroundPaint=Color.black;
  theme.plotBackgroundPaint=Color.black;
  theme.plotOutlinePaint=Color.yellow;
  theme.baselinePaint=Color.white;
  theme.crosshairPaint=Color.red;
  theme.labelLinkPaint=Color.lightGray;
  theme.tickLabelPaint=Color.white;
  theme.axisLabelPaint=Color.white;
  theme.shadowPaint=Color.darkGray;
  theme.itemLabelPaint=Color.white;
  theme.drawingSupplier=new DefaultDrawingSupplier(new Paint[]{Color.decode("0xFFFF00"),Color.decode("0x0036CC"),Color.decode("0xFF0000"),Color.decode("0xFFFF7F"),Color.decode("0x6681CC"),Color.decode("0xFF7F7F"),Color.decode("0xFFFFBF"),Color.decode("0x99A6CC"),Color.decode("0xFFBFBF"),Color.decode("0xA9A938"),Color.decode("0x2D4587")},new Paint[]{Color.decode("0xFFFF00"),Color.decode("0x0036CC")},new Stroke[]{new BasicStroke(2.0f)},new Stroke[]{new BasicStroke(0.5f)},DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
  theme.wallPaint=Color.darkGray;
  theme.errorIndicatorPaint=Color.lightGray;
  theme.gridBandPaint=new Color(255,255,255,20);
  theme.gridBandAlternatePaint=new Color(255,255,255,40);
  theme.shadowGenerator=null;
  return theme;
}

public static ChartTheme createDarknessTheme ( ) { StandardChartTheme theme = new StandardChartTheme ( "Darkness" ) ; theme . titlePaint = Color . white ; theme . subtitlePaint = Color . white ; theme . legendBackgroundPaint = Color . black ; theme . legendItemPaint = Color . white ; theme . chartBackgroundPaint = Color . black ; theme . plotBackgroundPaint = Color . black ; theme . plotOutlinePaint = Color . yellow ; theme . baselinePaint = Color . white ; theme . crosshairPaint = Color . red ; theme . labelLinkPaint = Color . lightGray ; theme . tickLabelPaint = Color . white ; theme . axisLabelPaint = Color . white ; theme . shadowPaint = Color . darkGray ; theme . itemLabelPaint = Color . white ; theme . drawingSupplier = new DefaultDrawingSupplier ( new Paint [ ] { Color . decode ( "0xFFFF00" ) , Color . decode ( "0x0036CC" ) , Color . decode ( "0xFF0000" ) , Color . decode ( "0xFFFF7F" ) , Color . decode ( "0x6681CC" ) , Color . decode ( "0xFF7F7F" ) , Color . decode ( "0xFFFFBF" ) , Color . decode ( "0x99A6CC" ) , Color . decode ( "0xFFBFBF" ) , Color . decode ( "0xA9A938" ) , Color . decode ( "0x2D4587" ) } , new Paint [ ] { Color . decode ( "0xFFFF00" ) , Color . decode ( "0x0036CC" ) } , new Stroke [ ] { new BasicStroke ( 2.0f ) } , new Stroke [ ] { new BasicStroke ( 0.5f ) } , DefaultDrawingSupplier . DEFAULT_SHAPE_SEQUENCE ) ; theme . wallPaint = Color . darkGray ; theme . errorIndicatorPaint = Color . lightGray ; theme . gridBandPaint = new Color ( 255 , 255 , 255 , 20 ) ; theme . gridBandAlternatePaint = new Color ( 255 , 255 , 255 , 40 ) ; theme . shadowGenerator = null ; return theme ; }
creates and returns a theme called " darkness " . in this theme , the charts have a black background .
