import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類

public static void setTimeSeriesRender(Plot plot, boolean isShowData, boolean isShapesVisible) {

XYPlot xyplot = (XYPlot) plot;

xyplot.setNoDataMessage(NO_DATA_MSG);

xyplot.setInsets(new RectangleInsets(10, 10, 5, 10));

XYLineAndShapeRenderer xyRenderer = (XYLineAndShapeRenderer) xyplot.getRenderer();

xyRenderer.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator());

xyRenderer.setBaseShapesVisible(false);

if (isShowData) {

xyRenderer.setBaseItemLabelsVisible(true);

xyRenderer.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator());

xyRenderer.setBasePositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.OUTSIDE1, TextAnchor.BOTTOM_CENTER));

}

xyRenderer.setBaseShapesVisible(isShapesVisible);

DateAxis domainAxis = (DateAxis) xyplot.getDomainAxis();

domainAxis.setAutoTickUnitSelection(false);

DateTickUnit dateTickUnit = new DateTickUnit(DateTickUnitType.YEAR, 1, new SimpleDateFormat("yyyy-MM"));

domainAxis.setTickUnit(dateTickUnit);

StandardXYToolTipGenerator xyTooltipGenerator = new StandardXYToolTipGenerator("{1}:{2}", new SimpleDateFormat("yyyy-MM-dd"), new DecimalFormat("0"));

xyRenderer.setBaseToolTipGenerator(xyTooltipGenerator);

setXY_XAixs(xyplot);

setXY_YAixs(xyplot);

}

newinsets用法java_Java XYPlot.setInsets方法代碼示例相关推荐

  1. create用法java_Java AcousticEchoCanceler.create方法代碼示例

    import android.media.audiofx.AcousticEchoCanceler; //導入方法依賴的package包/類 @Override public boolean init ...

  2. rowdata java_Java RowDataUtil.addRowData方法代碼示例

    本文整理匯總了Java中org.pentaho.di.core.row.RowDataUtil.addRowData方法的典型用法代碼示例.如果您正苦於以下問題:Java RowDataUtil.ad ...

  3. drawlinetest.java_Java Graphics2D.setRenderingHint方法代碼示例

    本文整理匯總了Java中java.awt.Graphics2D.setRenderingHint方法的典型用法代碼示例.如果您正苦於以下問題:Java Graphics2D.setRenderingH ...

  4. bls java_Java PairingFactory.getPairing方法代碼示例

    本文整理匯總了Java中it.unisa.dia.gas.plaf.jpbc.pairing.PairingFactory.getPairing方法的典型用法代碼示例.如果您正苦於以下問題:Java ...

  5. .net ref java_Java URL.getRef方法代碼示例

    本文整理匯總了Java中java.net.URL.getRef方法的典型用法代碼示例.如果您正苦於以下問題:Java URL.getRef方法的具體用法?Java URL.getRef怎麽用?Java ...

  6. isdisposed java_Java Shell.isDisposed方法代碼示例

    本文整理匯總了Java中org.eclipse.swt.widgets.Shell.isDisposed方法的典型用法代碼示例.如果您正苦於以下問題:Java Shell.isDisposed方法的具 ...

  7. remote_port java_Java HttpServletRequest.getRemotePort方法代碼示例

    import javax.servlet.http.HttpServletRequest; //導入方法依賴的package包/類 public ServletRequestCopy(HttpServ ...

  8. exhaustion java_Java Player.setExhaustion方法代碼示例

    import org.bukkit.entity.Player; //導入方法依賴的package包/類 /** * Set SamaGamesAPI */ @Override public void ...

  9. java getchildren用法_Java ZkClient.getChildren方法代碼示例

    import org.apache.helix.manager.zk.ZkClient; //導入方法依賴的package包/類 private static void zkCopy(ZkClient ...

最新文章

  1. ubuntu16.04 cuda9.0 cudnn Tensorflow GPU 1.10.0
  2. 基于视觉Transformer的目标检测
  3. 三级数据库还是linux好,08年计算机三级数据库辅导:如何修改Linux下MySQL5.0的默认连接数...
  4. 201521123054《Java程序设计》第1周学习总结
  5. 我用Python帮朋友做了张猪肉数据分析图,结果。。。
  6. 更改sql-2008sa密码
  7. pycharm shortcuts
  8. fix ubuntu boot(grub)
  9. MySQL 09 流程控制、自定义函数
  10. hb运行到微信小程序出现报错:[微信小程序开发者工具] ? Enable IDE Service (y/N) 
  11. 支付宝android 10.0.8,分享10.0.8版支付宝开启和关闭小额免密支付功能方法
  12. c语言char储存字符串,在c语言中char型数据在内存中的储存形式为什么
  13. OSChina 周日乱弹 —— 每天叫醒我的是Bug
  14. java 实例化异常_如何处理实例化类对象时发生的异常
  15. redis常用命令getex_Redis常用命令整理
  16. DVWA靶场通关(SQL注入)
  17. crt设置自动保存日志的方法
  18. 货来,速抢 — 天选 2 首发评测
  19. Python怎么识别文字?正确的方法详解
  20. 【电路】 TTL电平、CMOS电平区别

热门文章

  1. python二级多少分过_python考级有几个级别
  2. 【开源分享】VIDO-SLAM:一种视觉惯性动态物体SLAM系统
  3. OpenGL如何处理多个纹理
  4. 【SLAM建图和导航仿真实例】(三)- 使用RTAB-MAP进行SLAM建图和导航
  5. Vue搜索框保存临时搜索的记录
  6. 游戏设计行业标准测试:秘密收集
  7. Winder摆杆不稳除了PID还可能的原因
  8. zookeeper 和 dubbo 配置
  9. Java Web之XML基础
  10. lucene构建同义词分词器