You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having a line chart and I construct my axes and series using:
var x = mychart.addTimeAxis('x', 'date', '%Y-%m-%d %H:%I:%S', '%Y-%m-%d'),
y = mychart.addMeasureAxis('y', 'pageviews'),
s = mychart.addSeries('id', dimple.plot.line);
Then I attach an eventHandler to the series:
s.addEventHandler("mouseover", displayTooltip);
Where the handler function simply is defined as:
function displayTooltip(e) {
console.log(e);
}
The output of the console.log command indicates that all the seriesValue, xValue, yValue, zValue and colorValue fields are "undefined".
Also, the mouseover event doesn't seem to be triggered when hovering a point in the line chart – only when hovering the lines.
Is there any additional configuration that is required or something else that I've missed?
I've tried switching to a bubble chart instead (by passing dimple.plot.bubble to addSeries) and when doing that, the values appear correctly in the dimple.eventArgs object.
The text was updated successfully, but these errors were encountered:
Hi, I've just checked this out and it does look like a bug with line and area charts. The custom event handling is applied to the line and not the markers (which carry the information). I'll have a look when I get a chance.
The good news is that you can work around the bug quite easily by using some straight d3. Simply add your event handlers after the draw method has been called as follows:
svg.selectAll("circle").on("mouseover", function (e) { console.log(e); });
You'll notice you get a different event handler object but it will have the same information as the dimple event handler, just with different field names and extra ones.
I'm trying to override the tooltip creation, much like what's done in this example: http://dimplejs.org/advanced_examples_viewer.html?id=advanced_lollipop_with_hover
I'm having a line chart and I construct my axes and series using:
Then I attach an eventHandler to the series:
Where the handler function simply is defined as:
The output of the console.log command indicates that all the seriesValue, xValue, yValue, zValue and colorValue fields are "undefined".
Also, the mouseover event doesn't seem to be triggered when hovering a point in the line chart – only when hovering the lines.
Is there any additional configuration that is required or something else that I've missed?
I've tried switching to a bubble chart instead (by passing dimple.plot.bubble to addSeries) and when doing that, the values appear correctly in the dimple.eventArgs object.
The text was updated successfully, but these errors were encountered: