List of usage examples for org.jfree.chart.axis CategoryAxis setTickLabelPaint
public void setTickLabelPaint(Comparable category, Paint paint)
From source file:org.talend.dataprofiler.chart.util.TopChartFactory.java
/** * create bar chart.//from www . j ava 2 s . com * * @param titile * @param dataset * @return */ public static JFreeChart createBarChartByKCD(String title, CategoryDataset dataset, Object cusmomerDataset) { // ADD msjian TDQ-5112 2012-4-10: after upgrate to jfreechart-1.0.12.jar, change the default chart wallPaint ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme()); // TDQ-5112~ JFreeChart createBarChart = ChartFactory.createBarChart(null, Messages.getString("TopChartFactory.Value"), //$NON-NLS-1$ title, dataset, PlotOrientation.HORIZONTAL, false, false, false); CategoryPlot plot = createBarChart.getCategoryPlot(); if (cusmomerDataset != null) { plot.setDataset(1, new EncapsulationCumstomerDataset(dataset, cusmomerDataset)); } CategoryAxis domainAxis = plot.getDomainAxis(); domainAxis.setTickLabelPaint(NULL_FIELD, Color.RED); domainAxis.setTickLabelPaint(NULL_FIELD2, Color.RED); domainAxis.setTickLabelPaint(EMPTY_FIELD, Color.RED); // ADD TDQ-5251 msjian 2012-7-31: do not display the shadow BarRenderer renderer = new TalendBarRenderer(false, ChartDecorator.COLOR_LIST); renderer.setShadowVisible(false); // TDQ-5251~ plot.setRenderer(renderer); return createBarChart; }