【问题标题】:Highchart heatmap grouped category plugin styling issuesHighchart 热图分组类别插件样式问题
【发布时间】:2019-11-22 02:05:10
【问题描述】:

有人可以帮我解决以下样式问题吗?

  1. 为什么分类没有像插件网站的柱形图中显示的线分割?查看红色标记区域
  2. 我想从 HighChart 中获得 minorGridlines 属性,以明确区分类别。在示例中,每个类别都有 2 个子类别。如何从 highchart 以 2 个类别间隔添加小网格线?图片中的绿线是我想要的图表。

这是我的小提琴https://jsfiddle.net/k16sdhrz/

 chart: {
    type: 'heatmap',
},

yAxis: {
    categories: [{
            name: 'Cat 1',
            categories: ['Item 1_1', 'Item 1_2']
        },
        {
            name: 'Cat 2',
            categories: ['Item 2_1', 'item 2_2']
        }
    ]
},

提前感谢您的帮助。

【问题讨论】:

    标签: highcharts


    【解决方案1】:
    1. 增加tickWidth 属性(0 - 默认)
    2. 使用plotLines 选项:

    yAxis: {
        tickWidth: 1,
        labels: {
            x: -5
        },
        plotLines: [{
            value: -0.5,
            color: 'green',
            width: 5,
            zIndex: 10
        }, ...]
    }
    

    现场演示: https://jsfiddle.net/BlackLabel/ekcq2td8/

    API 参考: https://api.highcharts.com/highcharts/yAxis.tickWidth

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-09-24
      • 2020-07-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-30
      • 1970-01-01
      • 2017-09-29
      相关资源
      最近更新 更多