Skip to content

How to listen to a drill down event with Meteor? #23

@javaknight

Description

@javaknight

What I am trying to achieve:

  1. I need to use Template.myTemplate.events to access the bar-chart drilldown click in HighCharts via meteor.
  2. I need this because I need access to the template where it lives.
  3. 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
}
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions