Reputation: 1
I wish to hide the tooltip that is shown for xAxis title but still be able to show the same for when the user hovers over the axis labels and datapoints.
This is my xAxes config for reference:
[
{
"id": "c1",
"type": "CategoryAxis",
"title": {
"text": "am"
},
"renderer": {
"line": {
"isMeasured": false
},
"grid": {
"template": {
"disabled": true
}
},
"labels": {
"template": {
"rotation": -45,
"horizontalCenter": "right",
"verticalCenter": "middle",
"truncate": true,
"maxWidth": 300,
"dy": -10,
"adapter": [
{
"key": "text"
}
]
}
},
"minGridDistance": 20
},
"tooltipText": "",
"dataFields": {
"category": "am"
},
"cursorTooltipEnabled": true
} ]
Initially the behavior was that every time i hover over the axis title the previously hovered data point/ label's value is shown as the title's tooltip. I later changed my tooltipText value to empty string which seemed to be working. But now every time one of the data points is 0 either no tooltip is shown or is shown over the next data point.
Upvotes: -1
Views: 60
Reputation: 2785
Set tooltipText
to null to tell amCharts not to use any text for the tooltip of the axis title.
xAxis Config:
{
"id": "c1",
"type": "CategoryAxis",
"title": {
"text": "am"
},
// ... other properties ...
"tooltipText": null, // Disable tooltip for axis title
"dataFields": {
"category": "am"
},
"cursorTooltipEnabled": true // Enable tooltips for data points and labels
}
Upvotes: 0