Closed RobbiesCode closed 5 years ago
On click, you update categoryX
data field of the series, but category
data field of the category axis remains old one. Need to update it as well:
chart.xAxes.getIndex(0).dataFields.category = "category";
Of course, overlooked that completely. Thanks!
Actually, the error is still there, even after update the category
of the X Axis. I think it has to do with the hover or hit event. The columns are replaced, while the mouse is still over the column...
// throws error
series.columns.template.events.on("hit", function(e){
displayChildData();
});
// no error
series.columns.template.events.on("hit", function(e){
setTimeout(displayChildData, 100);
});
displayChildData function:
function displayChildData(){
// update series datafields
chart.series.getIndex(0).dataFields.valueY = "value";
chart.series.getIndex(0).dataFields.categoryX = "category";
categoryAxis.dataFields.category = "category";
var country = e.target.dataItem.dataContext.country;
chart.data = sub_data[country];
}
Fixed in 4.2.3.
ExportMenu
set, was resulting in error.DateAxis
could mistake yearly data for monthly data if baseInterval
was not set explicitly.location
on Y axis was being ignored.XYChart
.strictMinMax
and single data item fixed.valueY
(or any other value) wasn't working in legendSettings.itemLabelText
.Make sure you clear your browser cache after upgrading. And feel free to contact us again if you are still experiencing this issue.
While trying to build a Column Chart Drill Down example I came accross this error message:
I am only replacing
data
with a new array (to show "drill down" items):Codepen demo: https://codepen.io/team/amcharts/pen/a501be0585aa103b3df5216b3932db98?editors=1010