Im not getting x axis value (time) on tooltip as ballon text on mouse hover in Amchart horizon chart with multiple panels. I need x axis time on tool tip on mouse over. Please find more on: https://www.amcharts.com/demos/multi-panel-horizon-chart/
function buildPanel(dim) {
return {
"valueAxes": [{
"axisAlpha": 0,
"gridAlpha": 0,
"position": "left",
"gridCount": 2,
"labelsEnabled": false,
"labelFrequency": 1,
"strictMinMax": true,
"minimum": 0,
"maximum": 2
}, {
"id": "actual",
"axisAlpha": 0,
"gridAlpha": 0,
"position": "left",
"gridCount": 2,
"labelsEnabled": false
}],
"showCategoryAxis": true,
"stockGraphs": [{
"id": "pos_band1" + dim,
"lineAlpha": 0,
"showBalloon": false,
"valueField": "pos_1d",
"fillAlphas": 0,
"useDataSetColors": false,
"visibleInLegend": false,
"balloonText" :"Test Vale" // show Ballon Text
}, {
"fillAlphas": 1,
"lineColor": "#c6dbef",
"fillToGraph": "pos_band1" + dim,
"lineAlpha": 0,
"showBalloon": false,
"valueField": "pos_1u" + dim,
"type": "step",
"theme": "light",
"useDataSetColors": false,
"visibleInLegend": false
}, {
"id": "pos_band2" + dim,
"lineAlpha": 0,
"showBalloon": false,
"valueField": "pos_2d",
"fillAlphas": 0,
"useDataSetColors": false,
"visibleInLegend": false
}]
};
}
Can anyone please help me.
In your particular snippet you have to set
showBalloonto true, but you might get the raw band value rather than the final value if you replace yourballoonTextto[[value]]will show you the balloon of the raw band value rather than the final value, which might not be what you want. Also note that[[category]]will get you the date/time.If you want to modify the balloons in the demo you linked, you have to modify the
balloonTextas mentioned or create aballoonFunctionif you want to fine-tune the date formatting usingAmCharts.formatDatein the last two stockGraphs:Here's a demo