【问题标题】:Highcharts -> how to add vertical title to bar? how to make the symbol in the legend a rectangle?Highcharts -> 如何向条形添加垂直标题?如何使图例中的符号成为矩形?
【发布时间】:2022-01-18 10:04:30
【问题描述】:
`https://codepen.io/martynakil/pen/BawpPJv`

如何给栏添加垂直标题?如何将图例中的符号变成矩形?

我需要:

  1. 垂直标题
  2. 符号反应角
  3. 将负值与正值分开的垂直线

谢谢!

这里截图 [截图] enter image description here

【问题讨论】:

    标签: highcharts bar-chart titlebar legend-properties


    【解决方案1】:
    1. 使用数据标签:

      series: [{
          dataLabels: {
            enabled: true,
            verticalAlign: 'bottom',
            align: 'left',
            inside: true,
            rotation: -90,
            x: -20,
            y: -10
          },
          name: "John",
          data: [{
            dataLabels: {
              format: 'Apples'
            },
            y: 5
          }, ...]
        },
        ...
      ]
    
    1. Highcharts: Make the legend symbol a square or rectangle

    2. 使用情节线:


      yAxis: {
        ...,
        plotLines: [{
          value: 0,
          zIndex: 4
        }]
      }
    

    现场演示: http://jsfiddle.net/BlackLabel/hfamwetg/

    API 参考: https://api.highcharts.com/highcharts/series.column.dataLabels

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-04
    • 2019-09-07
    • 1970-01-01
    相关资源
    最近更新 更多