I am trying to listen to an event. For example, if a column chart is set up with A = 4, B = 9, and C = 2
Here's my (pseudo) code. If someone clicks column B, I want B and 9.
Template.myChartTemplate.events({
"dontknowwhattoputhere" : function (e,t) {
var aaa = ... something that retrieves the column name, which is B... ;
var bbb = .... something that retrieves the value of the column, which is 9...;
console.log("looks like you clicked on "+aaa+" and the val is "+bbb);
// I also need access to the template (t) , because I have something attached to it that I need to reference.
t.attachedFilter.set(aaa, bbb); // <== Passing on aaa and bbb to an attached filter on the template
}
});
Have you tried this? You need to register the click event in the chart. If you dont want to write the function in the chart object, you can reference a function.
What I am trying to achieve:
The api for drilldown is here. http://api.highcharts.com/highcharts#plotOptions.series.point.events.click
I am trying to listen to an event. For example, if a column chart is set up with A = 4, B = 9, and C = 2
Here's my (pseudo) code. If someone clicks column B, I want B and 9.
Template.myChartTemplate.events({ "dontknowwhattoputhere" : function (e,t) { var aaa = ... something that retrieves the column name, which is B... ; var bbb = .... something that retrieves the value of the column, which is 9...; console.log("looks like you clicked on "+aaa+" and the val is "+bbb); // I also need access to the template (t) , because I have something attached to it that I need to reference. t.attachedFilter.set(aaa, bbb); // <== Passing on aaa and bbb to an attached filter on the template } });