Opened 8 years ago

Closed 8 years ago

#17868 closed defect (invalid)

Charting: SelectableLegend and MouseZoomAndPan issue

Reported by: Blyx Owned by: Blyx
Priority: undecided Milestone: tbd
Component: Charting Version: 1.9.3
Keywords: Cc:
Blocked By: Blocking:


Create a chart with a SelectableLegend?, a y axis and a Lines plot linked to this axis . Create a MouseZoomAndPan? linked to the plot and y axis. Add a two series linked to the plot with 2 different colors. Render you graph.

The chart should appears with a legend. Hide a serie by clicking the legend. Use your mousewheel to zoom in the chart.


  • The hidden serie is visible again.
  • The SelectableLegend? hide/show feature do not work anymore.


  • the SelectableLegend? hide series by setting the shape stroke to null.
  • the chart.zoomin function calls chart.render which in turn call render on the plot, which recreate the series' polyline shape object and initialize them with the original stroke.
  • the SelectableLegend? _toggle is called with the shapes existing on the last legend._applyEvents calls.

Change History (5)

comment:1 Changed 8 years ago by bill

Component: GeneralCharting
Owner: set to Eugene Lazutkin

comment:2 Changed 8 years ago by Blyx

A cheap fix to this issue:

  • SelectableLegend?.refresh should persist the state of toggled series ie if a serie was hidden and still exist at the end of the refresh, hide it and update the checkbox accordingly
  • SelectableLegend?.refresh should be triggered on every Chart.render

This fix do not guarantee that the legend is always linked to the right shape.

A better fix:

  • maintain a visible flag on each serie
  • The SelectableLegend? update the flag and trigger a Chart.render to update it
  • The plot.render method take into account this flag and do not draw hidden series

comment:3 Changed 8 years ago by cjolif

Owner: changed from Eugene Lazutkin to cjolif
Status: newassigned

#15421 is implementing a visibility flag, so maybe it is fixing your issue? Can you give in a try (by running master instead of 1.9)? If you still reproduce in master/1.10 and in order to accelerate the resolution can you please directly attach the sample reproducing the issue?


comment:4 Changed 8 years ago by cjolif

Owner: changed from cjolif to Blyx
Status: assignedpending

comment:5 Changed 8 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.