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

hzl37du3 2009-01-07 11:08:54
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);
...全文
88 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧