惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
量子位
G
Google Developers Blog
J
Java Code Geeks
N
Netflix TechBlog - Medium
博客园 - 聂微东
宝玉的分享
宝玉的分享
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
雷峰网
雷峰网
M
MIT News - Artificial intelligence
T
Tailwind CSS Blog
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss

博客园 - Vince

在ubuntu server上安装沸腾时刻环境 ubuntu中管理用户和用户组 ubuntu14.04设置静态ip ssh 返回错误 Too many authentic authentication failures for root 的时候检查 ssh 配置 ubuntu安装 laravel 过程中出现: mcrypt php extension required 的问题 | 以及composer相关问题 | Nginx安装 mongo里面根据对象字段的ID查询 db.Photo.find({'owner.$id':ObjectId('xxxx')}) , 并且使用forEach循环修改查询的数据 绝对居中对齐的好办法 blur效果,模糊效果css vitualbox 主机与虚拟机能相互访问的设置 mongo对象var_dump的时候无法显示更多数据的处理办法 mongodb lock 出毛病时解决方法 ag使用需要注意的问题 twig用法 imagick用法! symfon2 配置文件使用 + HttpRequest使用 + Global多语言解决方案 Symfony中Doctrine对应的Mongodb数据类型 data type ubuntu 下配置 开发环境 nodejs mongodb 查询要看的文章 IE=edge 让浏览器使用最新的渲染模式
highcharts多个Y轴
Vince · 2014-02-02 · via 博客园 - Vince

http://blog.sina.com.cn/s/blog_6a53599101019qax.html

多个Y轴的实现方法在于把yAxis设置成一个数组,里面的一个对象代表一条Y轴,利用opposite:true来表示是否跟默认位置相反,默认Y轴的位置在图形左边,series中通过对每个series设置yAxis来表示使用哪个Y轴,0表示第一个,以此类推。

<script src="http://code.highcharts.com/highcharts.js"></script>

<div id="container" style="height: 400px"></div>

画图:

$(function () {

    $('#container').highcharts({

        xAxis: {

            categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']

        },

        yAxis:[{

            lineWidth : 1,

            title:{

                text :'y1'

            }

        },{

         title:{

                text :'y2'

            },

            lineWidth : 1,

            opposite:true

        },{

         title:{

                text :'y3'

            },

                  lineWidth : 1,

            opposite:true

        }],

        series: [{

            data: [1,2,3,4,5,6,7,8,9],

            name: 'Right',

            yAxis:0

        }, {

            data: [4,1,5,8,7,10,13,11,11],

            yAxis:1,

            name: 'Center'

        }, {

            data: [9,10,11,12,13,14,15,16,17],

            step: 'left',

            yAxis:2,

            name: 'Left'

        }]

    });

});

图形:highcharts多个Y轴