I was wondering if there's a way to get to the X-position of a certain data point? I'm now dividing the chart's width by the number of items (52) and multiplying it with the index of the record that I'm searching for in the data. This is the code I have now, but I think there's a better way to get to that X-position.
Code:
chartBackgroundDrawn: function() { var index, x; index = this.getFacetData().findIndex('special_item', true); x = this.getChartLeft() + this.getChartWidth() * (index + 0.5) / 52; return isc.DrawLine.create({ autoDraw: true, drawPane: this, endPoint: [x, this.getChartTop() + this.getChartHeight()], startPoint: [x, this.getChartTop()] }, { ... (line properties) });
Leave a comment: