Opened 10 years ago

Closed 7 years ago

#10967 closed enhancement (patchwelcome)

Small Bar and Columns can be difficult to click on in a chart

Reported by: Scott Andrews Owned by: dylan
Priority: high Milestone: 1.9
Component: Charting Version: 1.4.2
Keywords: Cc: cjolif, ben hockey
Blocked By: Blocking:

Description

Bar and Column charts that respond to mouse events are difficult to use when the value of the shape causes it's height/width to be very small compared to the scale of the chart.

We were able to work around the size of the bar/column by creating an invisible hit mask that occupies the same area as the bar/column, but fills the full potential area of the bar/column as if it were 100% height/width.

Charting events are registered for the hit mask instead of the true shape. However, the true shape is provided by the event callback instead of the mask, so chart actions works as expected.

Attachments (2)

10967.patch (2.0 KB) - added by Scott Andrews 10 years ago.
patch from Scott Andrews, VMware CCLA, portions Copyright 2010 VMware, Dojo is available under *either* the terms of the modified BSD license *or* the Academic Free License version 2.1. As a recipient of Dojo, you may choose which license to receive this code under (except as noted in per-module LICENSE files). Some modules may not be the copyright of the Dojo Foundation. These modules contain explicit declarations of copyright in both the LICENSE files in the directories in which they reside and in the code itself. No external contributions are allowed under licenses which are fundamentally incompatible with the AFL or BSD licenses that Dojo is distributed under.
10967.2.patch (3.2 KB) - added by dylan 7 years ago.
Revised patch (AMD, against 1.9 trunk)

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by Scott Andrews

Attachment: 10967.patch added

patch from Scott Andrews, VMware CCLA, portions Copyright 2010 VMware, Dojo is available under *either* the terms of the modified BSD license *or* the Academic Free License version 2.1. As a recipient of Dojo, you may choose which license to receive this code under (except as noted in per-module LICENSE files). Some modules may not be the copyright of the Dojo Foundation. These modules contain explicit declarations of copyright in both the LICENSE files in the directories in which they reside and in the code itself. No external contributions are allowed under licenses which are fundamentally incompatible with the AFL or BSD licenses that Dojo is distributed under.

comment:1 Changed 10 years ago by Eugene Lazutkin

Milestone: tbdfuture
Status: newassigned
Summary: Small Bar and Columns can be difficult to click on in a chart[ccla][patch]Small Bar and Columns can be difficult to click on in a chart

Changed 7 years ago by dylan

Attachment: 10967.2.patch added

Revised patch (AMD, against 1.9 trunk)

comment:2 Changed 7 years ago by dylan

Cc: cjolif ben hockey added
Milestone: future1.9
Owner: changed from Eugene Lazutkin to dylan

I've attempted to update this patch as it seems like a nice improvement that has been ignored for far too long.

This needs a review... Perhaps Ben or Patrick or Eugene would be interested in looking into it?

comment:3 Changed 7 years ago by cjolif

Dylan, I don't think the patch even reworked will work as-is. The shape mask rectangle that is created does not seem to have the right coordinate in all cases as it does not take into account some of the new properties that were added to charting since the initial patch. Also I don't think the shapeMask property should be set on the connected object but the eventMask property.

If I have time before the beta I will try to come up with an alternate patch but no promise as I don't have much time. If someone else has one I'll be happy to review it.

Also maybe allow to configure the hit testing threshold would be nice.

comment:4 Changed 7 years ago by dylan

Milestone: 1.92.0

Ok, punting to 2.0 then, unfortunately.

comment:5 Changed 7 years ago by dylan

Milestone: 2.01.9
Resolution: patchwelcome
Status: assignedclosed
Summary: [ccla][patch]Small Bar and Columns can be difficult to click on in a chartSmall Bar and Columns can be difficult to click on in a chart

To get this into Dojo, it will need a working patch against more recent versions of Dojo.

Note: See TracTickets for help on using tickets.