Nishant Roy
Nishant Roy

Reputation: 1141

AmCharts ChartCursor hide value on legend

Fiddle: https://jsfiddle.net/rjkmu0rn/

When I add a ChartCursor to my chart, it displays the value of the points on the legend and, as a result, overlaps on the legend itself.

Any ideas on how to prevent ChartCursor from displaying the values on the legend?

Upvotes: 1

Views: 1933

Answers (2)

Ares
Ares

Reputation: 1461

You can set the valueText to be an empty string.

  legend: {
    useGraphSettings: true,
    valueText: ""
  }

Upvotes: 3

Nishant Roy
Nishant Roy

Reputation: 1141

Fixed it by adding a valueFunction to the legend settings: https://jsfiddle.net/rjkmu0rn/2/

legend: {
    "horizontalGap": 50,
    "useGraphSettings": true,
    "valueFunction": function(graphDataItem, valueText) {
      return "";
    }
  }

Upvotes: 1

Related Questions