Skip to content
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

[Bug]: Diff tooltips prefix option #688

Open
1 task
rodrigorz opened this issue Oct 29, 2022 · 0 comments
Open
1 task

[Bug]: Diff tooltips prefix option #688

rodrigorz opened this issue Oct 29, 2022 · 0 comments
Labels

Comments

@rodrigorz
Copy link

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

Current and expected behavior

Currently the old data tooltip is not displaying correctly, se the image below:

image

The '&' character present in the old data tooltip (gray) is from index 1 of the new data tooltip (blue). If the new data tooltip is "LAbel", the old data tooltip will be 'A'.

To reproduce: codesandbox

Add these options to Chart at App.tsx:

      options={{
        diff: {
          oldData: {
            tooltip: {
              prefix: 'OLD',
            },
          },
          newData: {
            tooltip: {
              prefix: 'L&bel 2',
            },
          },
        },
      }}

Reproduction

https://codesandbox.io/s/github/RakanNimer/react-google-charts/tree/master/sandboxes/column-chart/diff?from-embed=&file=/App.tsx:531-787

react-google-charts version

v4.0.0

Possible solution

Check the logic of the old data tooltip to get from the option diff.oldData.tooltip.prefix.

@rodrigorz rodrigorz added the bug label Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant