如何在HighChart中动态地将轴从线性变为对数 [英] How to dynamically change axis from linear to logarithmic in HighChart

查看:180
本文介绍了如何在HighChart中动态地将轴从线性变为对数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在HighCharts中将轴从线性动态更改为对数,反之亦然。请参阅此小提示示例

  yAxis:{
// linear
type:'logarithmic',
minorTickInterval:0.1
},

type:String 在api中用于初始声明性图表设置。

使用 axis.update ,请参阅: http://jsfiddle.net/ZCecV/1/ (docs : http://api.highcharts.com/highcharts#Axis.update()


I want to dynamically change axis from linear to logarithmic and vice versa in HighCharts. Please see this fiddle example.

yAxis: {
    //linear
    type: 'logarithmic',
    minorTickInterval: 0.1
},

There is a type: String in api For initial declarative chart setup. I want to dynamically change to logarithmic/linear back and forth.

解决方案

Use axis.update, see: http://jsfiddle.net/ZCecV/1/ (docs: http://api.highcharts.com/highcharts#Axis.update() )

这篇关于如何在HighChart中动态地将轴从线性变为对数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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