What I am trying to achieve:
- I need to use Template.myTemplate.events to access the bar-chart drilldown click in HighCharts via meteor.
- I need this because I need access to the template where it lives.
- Using the highcharts API, I don't know how to reference the template and pass on the information to the attachedFilter (see below).
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
}
});
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
}
});