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

Inconsistent Color Scale Displayed on World Map When Clicking on a Country in Global Report Page #735

Closed
mohamedawnallah opened this issue Jan 14, 2024 · 18 comments · Fixed by #736
Assignees
Labels
good first issue Good for newcomers

Comments

@mohamedawnallah
Copy link
Member

Describe the bug
The issue pertains to the inconsistency in maintaining the color scale when a country is clicked on the world map, both in the main data visualization and the sub-world map data visualization.

To Reproduce
Follow these steps to replicate the behavior:

  1. Navigate to the Global Report page.
  2. Observe the color scale for a specific country (e.g., Brazil).
  3. Click on the selected country (Brazil).
  4. Note that the color scale does not match the expected scale and differs from the state before clicking.

Expected behavior
The color scale for a given country should remain consistent, both before and after clicking.

Screenshots
The issue is illustrated in the following screenshot, where Brazil, initially displaying 689 alarms in yellow, exhibits a different color after clicking.
2024-01-14_20-46

@mohamedawnallah mohamedawnallah added the good first issue Good for newcomers label Jan 14, 2024
@MAVRICK-1
Copy link

@mohamedawnallah can you assign me this? :-)

@mohamedawnallah
Copy link
Member Author

Thanks @MAVRICK-1 for your interest! Before assigning this to you, How would you tackle it?

@MAVRICK-1
Copy link

Thanks @MAVRICK-1 for your interest! Before assigning this to you, How would you tackle it?

Adjust the choropleth map and color bar based on Alarm Counts. By ensuring that the color scales match for both the map trace and the color bar in the layout.

@MAVRICK-1
Copy link

I know basic plotlyjs, I can go through the documentation and fix this

@RickDeb2004
Copy link

@mohamedawnallah @MAVRICK-1 I have a good experience in plotlyjs , can fix this issue .

@MAVRICK-1
Copy link

@mohamedawnallah @MAVRICK-1 I have a good experience in plotlyjs , can fix this issue .

Anyways you can go for it , I am currently working on other issues

@mohamedawnallah
Copy link
Member Author

Go for it @RickDeb2004

@RickDeb2004
Copy link

@mohamedawnallah @MAVRICK-1 I have a good experience in plotlyjs , can fix this issue .

Anyways you can go for it , I am currently working on other issues

Thank you

@githyuvi
Copy link
Contributor

@mohamedawnallah I see this issue is still not closed yet. Can I work on it as I have found the solution.
Additionally, Reactive Chart and its parent components are getting rendered multiple times making the whole thing very slow.

@RickDeb2004
Copy link

@mohamedawnallah I see this issue is still not closed yet. Can I work on it as I have found the solution.
Additionally, Reactive Chart and its parent components are getting rendered multiple times making the whole thing very slow.

I am working on it...and it's almost done...as I am not making a PR now..by EOD I will push my PR .

@githyuvi githyuvi mentioned this issue Jan 27, 2024
6 tasks
@githyuvi
Copy link
Contributor

@mohamedawnallah I am not able to add reviewer and link my PR with this issue

@mohamedawnallah
Copy link
Member Author

@githyuvi Thanks anyway for your PR but please don't submit a PR while others have explicitly mentioned that they are currently working on this issue and assigned to it. That said I'm not sure if @RickDeb2004 resolved this issue?

@mohamedawnallah
Copy link
Member Author

Additionally, Reactive Chart and its parent components are getting rendered multiple times making the whole thing very slow.

@githyuvi this sounds a good catch! Since Reactive Chart is a reusable component across multiple pages/routes It would be nice if we create a specific issue for it following the issue template to get more context and understanding about the issue and when it happens and if it is a legimitate issue feel free to work on it :)

@githyuvi
Copy link
Contributor

@mohamedawnallah As this issue has been open for so long. Can you assign this to me now?

@RickDeb2004
Copy link

@mohamedawnallah As this issue has been open for so long. Can you assign this to me now?

I am working on this issue ..got some problem while pushing PR
@githyuvi @mohamedawnallah
image

@mohamedawnallah
Copy link
Member Author

mohamedawnallah commented Jan 29, 2024

@RickDeb2004 Since husky doesn't give a full trace of the error (as shown in the screenshot) and also in typicode/husky#1014 we could use a temporary something like this thread on StackOverflow:
https://stackoverflow.com/a/70529234

@dpgiakatos dpgiakatos linked a pull request Feb 27, 2024 that will close this issue
6 tasks
@RickDeb2004
Copy link

@dpgiakatos Don't know why not the colors or the countries are not shown in the map
image

@dpgiakatos
Copy link
Member

It takes some time to fetch and load the data. I just tested it now, and the visualization is working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants