小编sho*_*rty的帖子

JFreeChart BarChart - >没有渐变

默认情况下,我的条形图始终使用渐变颜色绘制.我只想要一个没有任何风格效果的简单颜色.

有人可以帮忙吗?

码:

   final JFreeChart chart = ChartFactory.createBarChart(
        "",         // chart title
        xLabel,               // domain axis label
        yLabel,                  // range axis label
        dataset,                  // data
        PlotOrientation.VERTICAL, // orientation
        true,                     // include legend
        false,                     // tooltips?
        false                     // URLs?
    );

  final CategoryPlot plot = chart.getCategoryPlot();
  // SOMETHING HAS TO BE DONE HERE

  showChart(chart); // Simply shows the chart in a new window
Run Code Online (Sandbox Code Playgroud)

谢谢

java colors jfreechart bar-chart

25
推荐指数
2
解决办法
1万
查看次数

使用Gson将JSON字符串解析为Dictionary <String,Integer>

我有一个JSON字符串,如下所示: {"altruism":1,"amazon":6}

我想要的是HashMap<String, Integer>之后有两个条目.

Key: altruism Value: 1
Key: amazon Value:6
Run Code Online (Sandbox Code Playgroud)

我真的无法弄清楚如何做到这一点.通常有从JSON字符串解析的对象,但这不是这里的情况.

java json dictionary gson

13
推荐指数
1
解决办法
9941
查看次数

标签 统计

java ×2

bar-chart ×1

colors ×1

dictionary ×1

gson ×1

jfreechart ×1

json ×1