G2 icon indicating copy to clipboard operation
G2 copied to clipboard

Legend interactions do not function properly when the json key has a '.' in the text

Open ThamaluM opened this issue 2 years ago • 0 comments

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

https://github.com/ThamaluM/g2_legend_issue_minimal/blob/main/legend_issue.html

Steps to reproduce

  1. Open the HTML file in the browser.
  2. Click on a legend item to deselect it
  3. Click on another legend item to deselect it too.
  4. You will notice that previously deselected items are automatically get selected.
Environment Info
g2 4.2.5
System Ubuntu 18.04.6
Browser Firefox 102.0

  1. This happens when the JSON key corresponding to the legend has a '.' in it.
  2. The '.' in JSON keys works fine except for this issue in the legend.

ThamaluM avatar Jul 25 '22 19:07 ThamaluM