0

BarRenderer Tooltip 是否与 jsf 一起使用?

 private JFreeChart createChart(CategoryDataset categorydataset) {
    JFreeChart jfreechart = ChartFactory.createStackedBarChart3D("Stacked Bar Chart 3D Demo 1", null, "Value", categorydataset, PlotOrientation.VERTICAL, true, true, false);
    CategoryPlot categoryplot = (CategoryPlot) jfreechart.getPlot();
    IntervalMarker intervalmarker = new IntervalMarker(5D, 10D, Color.gray, new BasicStroke(0.5F), Color.blue, new BasicStroke(0.5F), 0.5F);
    categoryplot.addRangeMarker(intervalmarker);
    BarRenderer barrenderer = (BarRenderer) categoryplot.getRenderer();
    barrenderer.setDrawBarOutline(false);
    barrenderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());
    barrenderer.setBaseItemLabelsVisible(true);
    barrenderer.setBasePositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.CENTER, TextAnchor.CENTER));
    barrenderer.setBaseNegativeItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.CENTER, TextAnchor.CENTER));
    barrenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator(
            "Series {0}, Value {1}", NumberFormat.getInstance()));

我看不到每个栏的工具提示

我是否遗漏了某些东西,或者它可能无法通过 jsf 工作?

谢谢

4

0 回答 0