Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
棒グラフを表すコードを実装しました(写真のように)。今私の問題は、通貨を表すために $ 記号を値に追加したいということです。したがって、値は次のようになります。
$0 ---- $500,000 ----- $1,000,000
何か案が?
ありがとう。まさにそれ、私も見つけました
final CategoryPlot plot = chart.getCategoryPlot(); NmberAxis rangeAxis = (NumberAxis) plot.getRangeAxis(); DecimalFormat format = new DecimalFormat("$##,###,###,###"); rangeAxis.setNumberFormatOverride(format);
final CategoryPlot plot = chart.getCategoryPlot();
NmberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
DecimalFormat format = new DecimalFormat("$##,###,###,###");
rangeAxis.setNumberFormatOverride(format);