如何更改网格线之间的距离? [英] How to change the distance between lines of grid?

查看:125
本文介绍了如何更改网格线之间的距离?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有

  yAxis: {

        reversed: true,
        categories: ['0','10','20','30','50','80','130','210','340','550','700'],                       
        labels: {
                    format: '{value} km',
                    enabled: true
                },
        title: {
                text: "Depth"
                }
         },

但是我想更改网格线之间的距离(线值0km,线值10km ecc ecc)

but i want to change the distance between the lines of grid (line value 0km, line value 10km ecc ecc)

可能吗?

推荐答案

这两个应该有效.使用更适合您的那一种.

These two should work. Use the one that fits you better.

        tickPositions
        tickPositioner

示例:

http://jsfiddle.net/jfbffqe7/

http://jsfiddle.net/0xb2c8e5/

修改: 这应该达到您在注释中要求的技巧. http://jsfiddle.net/0xb2c8e5/1/

This should do the trick of what you requested in the comments. http://jsfiddle.net/0xb2c8e5/1/

yAxis: {
        tickPositioner: function(){
            return[0,30, 50, 100, 250];},
        tickPixelInterval: 1},

使用值为1的tickPixelInterval,并且唯一返回要查看的报价.

Use tickPixelInterval with value of one, and the only return the ticks you want to see.

这篇关于如何更改网格线之间的距离?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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