-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ChartsCollection.onDeactivated event fires wrongly when shift-click a second chart - fix or document? #4370
Comments
Thanks for reporting this @NickRedwood. I'm going to transfer it to the office-js repo and get a member of the Excel feature crew to take a look. |
Thanks @AlexJerabek |
I have found that the |
Thank you @NickRedwood for raising the problem.
|
Thanks @dingjin-ms |
This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins! |
This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue. |
Article URL
On what page did you find the problem?
https://learn.microsoft.com/en-us/javascript/api/excel/excel.chartcollection?view=excel-js-preview#excel-excel-chartcollection-ondeactivated-member
Describe the problem
You have two charts on an Excel sheet and you add
onActivated
andonDeactivated
methods to either the individualChart
s or theChartCollection
, as in the linked example. If you click one chart thenonActivated
fires. If you then shift-click the second chart,onDeactivated
fires on the first chart, even though it is still active.I recently realised the web version of Excel (which I rarely use) does not allow multiple selection of charts or shapes, which I guess is the source of this problem. In desktop Excel though the current behaviour is not right. If it can't be fixed, a note in the documentation could be added.
The overall context is I'm trying to create an add-in to apply bulk formatting to charts, and was trying to use events to write my own version of
getActiveCharts
in the absence of a built-in method. There is only the singulargetActiveChart
.The text was updated successfully, but these errors were encountered: