1
`https://codepen.io/martynakil/pen/BawpPJv`

how to add vertical title to bar? how to make the symbol in the legend a rectangle?

I need:

  1. title vertical
  2. symbol a reactangle
  3. a vertical line that separates the negative value from the positive value

THANK YOU!

here screenshot [screenshot] enter image description here

MarKil
  • 19
  • 3

1 Answers1

1
  1. Use data labels:

  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. Use plotlines:


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

Live demo: http://jsfiddle.net/BlackLabel/hfamwetg/

API Reference: https://api.highcharts.com/highcharts/series.column.dataLabels

ppotaczek
  • 36,341
  • 2
  • 14
  • 24