7

echarts y轴不能等比例

 3 years ago
source link: http://www.hechunbo.com/index.php/archives/395.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

echarts y轴不能等比例

因为y轴数字太小了, 都是0.9, 1.0 之间,波动很少 , 默认的波动范围太小,

网上有等比例缩放的, 但感觉不能治根

还是有从源码那里看看.

但是源码竟然多次下载失败,只能说迁当时候你要连上国际网才行.

但是在使用的时候可以根据echarts的api多次尝试,自带的参数 .

地址是: 要注意的是, 不同图下面的参数,有的是不生效的.

有的是不准的,比如splitnumber .

#这是配置项手册,各个参数代表什么意思都有.
https://echarts.apache.org/zh/option.html#title

#api手册
https://echarts.apache.org/zh/api.html#echarts

#源码:
https://echarts.apache.org/zh/api.html#echarts

echart 折线图 y轴如何平分
echarts Y轴数据类型不同怎么让折线图显示差距不大 
ECharts折线图Y轴设置最小最大刻度值,Y轴刻度就不会均分了
echart绘制多条折线图时y轴自动生成的刻度并没有与值相对应怎么解决 
echarts折线图y轴刻度值按照某个值的倍数
Echarts实现折线图Y轴不等距百分比

  1. 多条线时,鼠标放上去的时候显示各线数值
    使用tooltip这个参数, 官方有提供{a}{b},{c},{d}四个参数的给合, 但是如果换算成百分比的话,没查到具体的.

先使用下面的方法来解决.

   tooltip:{
       formatter:funcation(value){
           var str='<div><p>'+value[0].name.split["[]"][0]+"</p></div>";
           for(var i=0;i<value.length;i++){
               str+=value[i].marker+" "+value[i].serialName+" "+value[i].data.toFixed(2)+"%</br>"
           }
           return str
       }
   }

相关问题:

   echart tooltip 保留2位小数

取基金,上证收益率曲线.

  1. 要以基金为基准,去截较上证的时间周期.

因为有的基金是新发的, 有的是发不久的, 时间 肯定 要小于上证的时间 .

如果不这样,取的时间 轴数据量不一样, 画线的时候就会出问题.

  1. 基金的收益率曲线以基金的复权净值 为计算, 上证的收益率曲线以当前净值 和第一个日期的净值 ,做一个公式计算

    (当天日期净值-坐标轴上第一天的净值 )/当天日期净值 *100
    

vue如何打开调试

在vue.cofig.js 中加入以下

  configureWebpack: {
    devtool: '#eval-source-map'
  },

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK