Opened 9 years ago

Closed 4 years ago

#11150 closed enhancement (patchwelcome)

Charting - Provide reference to point shape without clicking

Reported by: amyatt Owned by: Eugene Lazutkin
Priority: high Milestone: 1.13
Component: Charting Version: 1.4.3
Keywords: chart connectToPlot series onclick shape Cc: adammyatt@…, cjolif
Blocked By: Blocking:

Description

My scenario is this:

Using Dojo 1.3 or 1.4, I have a simple Chart2D chart of type Lines with 2 axis, 1 plot, and 1 series with several points on it. I use connectToPlotlike this :

chart1.connectToPlot("default", function(evt) {fnEvent(evt);});

...and in fnEvent check the type of event and do something with the evt.shape object

function fnEvent(evt) {

if(evt.type == "onclick") {

do something evt.shape

}

}

I can use the evt.shape to get a handle to the actual shape and evt.index to look up the actual x/y value in the series. My issue is that there needs to be a method using an API call or array reference to get a reference to the shape object for other points in the series without clicking on them. For example I know I can do something like plot.series[0].data where data is the array of actual values, but there does not seem to be an array in the series object referencing the actual shape objects representing each point in the series.

This would be very useful to have to interact with the points in a chart.

Change History (7)

comment:1 Changed 9 years ago by amyatt

Can anyone venture whether or not this issue can be added in the near future and/or a time frame for implementation?

comment:2 Changed 9 years ago by Eugene Lazutkin

Milestone: tbdfuture
Status: newassigned

comment:3 Changed 8 years ago by cjolif

Cc: cjolif added

comment:4 Changed 7 years ago by cjolif

See #14359 as well.

Last edited 7 years ago by cjolif (previous) (diff)

comment:5 Changed 7 years ago by cjolif

amyatt, I'm investigating the possibility of implementing this for new release. However can you please elaborate a bit more on the kind of interactions you expect to have with the shapes once you'll get access to them outside of eventing system? Thanks.

comment:6 Changed 7 years ago by amyatt

cjolif - it's been a while, but if memory serves I think I was trying to be able to dynamically get access to a shape object of an individual point (or points). In many cases, in business apps showing a chart on a webpage is typically accompanied by a view of the underlying data (tabular data) and/or a panel of filters or buttons that allow you to manipulate what data gets charted. There are various scenarios where it would be nice to get a dynamic reference to the shape of only specific points and move them or animate them. I would like the ability to treat a shape that corresponds to a point in a chart the same way, whether a user event like a click triggered it or if I need a dynamic reference to it. For example, if I charted a line plot of "years" on the X axis and I wanted to animate or change colors or manipulate the shape of a particular year. If the business user of an app changes a filter or performs some data interaction for a specific year or severla years, we know the data element, but without the user clicking the matching years on the line plot you cannot get a reference to 2 or 3 of the shapes representing the years.

Hopefully this clarifies a little. Please let me know if I can provide more details.

comment:7 Changed 4 years ago by dylan

Milestone: future1.12
Resolution: patchwelcome
Status: assignedclosed

Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.