有谁用过jstockchart开发过股票分时图,怎么去掉交易量的那一块

hzl37du3 hzl37du3 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
List data =datas;

// the 'timeline' indicates the segmented time range '09:30-11:30,
// 13:30-15:30'.
SegmentedTimeline timeline = new SegmentedTimeline(
SegmentedTimeline.MINUTE_SEGMENT_SIZE, 1320, 120);
timeline.setStartTime(SegmentedTimeline.firstMondayAfter1900() + 810
* SegmentedTimeline.MINUTE_SEGMENT_SIZE);

// Creates timeseries data set.
TimeseriesDataset dataset = new TimeseriesDataset(Minute.class, 1,
timeline, true);
dataset.addDataItems(data);

// Creates logic price axis.
CentralValueAxis logicPriceAxis = new CentralValueAxis(
last_settle, new Range(dataset.getMinPrice().intValue(), dataset.getMaxPrice().intValue()), 9,
new DecimalFormat("0"));
PriceArea priceArea = new PriceArea(logicPriceAxis);


// Creates logic volume axis.
LogicNumberAxis logicVolumeAxis = new LogicNumberAxis(new Range(dataset
.getMinVolume().intValue(), dataset.getMaxVolume().intValue()
), 5, new DecimalFormat("0"));

// LogicNumberAxis logicVolumeAxis = new LogicNumberAxis(new Range(0, 0), 2, new DecimalFormat("0"));

VolumeArea volumeArea = new VolumeArea(logicVolumeAxis);

TimeseriesArea timeseriesArea = new TimeseriesArea(priceArea,
volumeArea, createlogicDateAxis(DateUtils
.createDate(year,month,day)));


JFreeChart jfreechart = JStockChartFactory.createTimeseriesChart(
titleName, dataset, timeline, timeseriesArea,
false);

ChartUtilities.saveChartAsPNG(new File(imageFile), jfreechart, 300, 250);
...全文

相关推荐

评论 1
收藏 已收藏
分享
返回顶部
hzl37du3
Java EE 67,535 成员 225,843 内容