gpt4 book ai didi

java - AFreeChart OHLC 数据集 : how to remove spaces where no data at date axis?

转载 作者:搜寻专家 更新时间:2023-11-01 08:05:07 24 4
gpt4 key购买 nike

3月9日-10日没有数据,请问这段时间可以去掉空格吗?

OHLC chart

最佳答案

如果是周末数据产生了差距,你可以这样做

SegmentedTimeline timeline = SegmentedTimeline.newMondayThroughFridayTimeline();
((DateAxis) chart.getXYPlot().getDomainAxis()).setTimeline(timeline);

final OHLCDataset dataset = new DefaultOHLCDataset("Series1", ohlc);
SegmentedTimeline timeline = SegmentedTimeline.newMondayThroughFridayTimeline();
chart = ChartFactory.createHighLowChart(this.getTitle(),xLabel, yLabel,dataset,timeline, false);

如果不是周末,那么您将不得不更聪明地使用 SegmentedTimeline api

http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/axis/SegmentedTimeline.html

关于java - AFreeChart OHLC 数据集 : how to remove spaces where no data at date axis?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15381045/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com