没有垂直轴和水平线网格的XYPlot? [英] XYPlot without vertical axis and horizontal line grid?

查看:199
本文介绍了没有垂直轴和水平线网格的XYPlot?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只能绘制垂直数据轴(没有轴线(在XYPlot中,只有在网格线中的水平线)(我知道黑客 - 用白色绘制它们,这与背景颜色一致,可能是更纯方式)?



setNumberFormatOverride()指定范围轴上的货币格式,如此处所示。

  NumberFormat currency = NumberFormat.getCurrencyInstance(); 
NumberAxis rangeAxis =(NumberAxis)plot.getRangeAxis();
rangeAxis.setNumberFormatOverride(currency);


Can I draw only vertical data axis (without axis line( in XYPlot and only horizontal line in grid lines (I know the hack - draw them by white color, that is coincident with background color, may be, there is more pure way) ?

解决方案

You can specify currency formatting on the range axis using setNumberFormatOverride(), as shown here.

NumberFormat currency = NumberFormat.getCurrencyInstance();
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setNumberFormatOverride(currency);

这篇关于没有垂直轴和水平线网格的XYPlot?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆