zoukankan      html  css  js  c++  java
  • MSChart 双Y轴 自适应,轴刻度坐标值美化

    题记:今天是要爆发了,要反哺尽点力

    Chart有很多,前端的如HeightChart...连百度都搞了一个。微软MSChart依旧停滞不前,没想到这会显示出 落后的优点了。

     双Y轴 自适应

    Series def = new Series();
    def.YAxisType = AxisType.Secondary;
    chartArea.AxisY2.Maximum =  data.Max().ToString(); 
    chartArea.AxisY2.Minimum =  data.Min().ToString() ;
    
    
    Series def2 = new Series();
    def2.YAxisType = AxisType.Secondary;
    chartArea.AxisY2.Maximum = Utils.ToDouble(data.Max(), 1);
    chartArea.AxisY2.Minimum = Utils.ToDouble(data.Min(), 0);
    
    
    chartArea.AxisY.IsLabelAutoFit = true;
    chartArea.AxisY2.IsLabelAutoFit = true;
    
    //轴坐标刻度小数点
    chartArea.AxisY.LabelStyle.Format = @"{0:0.#}";
    chartArea.AxisY2.LabelStyle.Format = @"{0:0.#}"; 
    

      

  • 相关阅读:
    前端js(一)
    前端CSS
    前端HTML
    视图等
    Navicat使用
    查询语句
    SpringBoot不能直接访问templates下的静态资源
    Mybatis什么时候用${}
    thymeleaf使用restul风格URL
    SpringBoot使用PageHelper
  • 原文地址:https://www.cnblogs.com/recordman/p/4568358.html
Copyright © 2011-2022 走看看