javascripthighchartsangular2-highcharts

Higcharts annotations for various chart types


I'd like to know if annotations are supported for the following chart types:

I was able to get annotations work with "simple" charts that have X and Y axes, but I'm having trouble with those above. I would like to use mock points instead of point ID.

I tried specifying mock points just like I did for XY-axis charts, but I just could not get it to work.


Solution

  • In Highcharts, annotations are primarily designed for charts with x and y axes. The chart types you mentioned lack them so it's quite challenging to implement annotations there. Still it's possible (we only need to refer to the pixel coordinates rather than the point values).

    Pie chart: https://jsfiddle.net/BlackLabel/7j063hmg/ Treemap chart: https://jsfiddle.net/BlackLabel/6us7eLbj/

    It should work the same for the dependency wheel and wordcloud charts.

      annotations: [{
        labels: [{
          point: {
            x: 450,
            y: 129.2
          },
          text: 'x: {x}<br/>y: {y}'
        }]
      }]