次のプロパティを使用してステップ チャートをプロットしようとしています: x 軸: 時間 (ミリ秒) [実際のデータにはこれが double 値として含まれています] y 軸: 整数として格納された別の値。
次のようにデータセットを埋めています。
private XYSeries populateStepChartDataSet(HashMap<Double, Integer> dataGrid){
XYSeries xySeries = new XYSeries("Step Plot", true, true);
if(dataGrid != null){
for (Double timeStamp : dataGrid.keySet()) {
xySeries.add(timeStamp, dataGrid.get(timeStamp));
}
}
return xySeries;
}
そして、プロットを作成するセクションは次のとおりです。
final XYSeriesCollection dataset = new XYSeriesCollection();
dataset.addSeries(populateStepChartDataSet(dspDataGrid));
final JFreeChart chart = ChartFactory.createXYStepChart(
title,
xAxisLabel, yAxisLabel,
dataset,
PlotOrientation.VERTICAL,
true, // legend
true, // tooltips
false // urls
);
私が期待しているのは、プロットが x 軸にミリ秒で時間を表示することですが、この値は奇妙な時間に変換されています。プロットは次のようになります
誰かが x 軸のミリ秒形式のタイムスタンプを取り戻すのを手伝ってくれませんか?