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

feat: Add Series Colour property for default charts #18229

Merged
merged 6 commits into from
Dec 9, 2022

Conversation

souma-ghosh
Copy link
Contributor

@souma-ghosh souma-ghosh commented Nov 17, 2022

Description

In default charts, only series title and series data could be provided by developer.
We have added the Series Color property as well in this PR to control the color of all the default charts (Except Pie Chart).

  • Not applicable for custom charts
  • Series Color will only work with hex code values as of now
  • Series Color not applicable for Pie Chart and hence this feature is not available for Pie Chart

Fixes #15522

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Manual

Test Plan

Add Testsmith test cases links that relate to this PR

Issues raised during DP testing

Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)

Checklist:

Dev activity

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • PR is being merged under a feature flag

QA activity:

  • Test plan has been approved by relevant developers
  • Test plan has been peer reviewed by QA
  • Cypress test cases have been added and approved by either SDET or manual QA
  • Organized project review call with relevant stakeholders after Round 1/2 of QA
  • Added Test Plan Approved label after reveiwing all Cypress test

@vercel
Copy link

vercel bot commented Nov 17, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
appsmith ✅ Ready (Inspect) Visit Preview Dec 2, 2022 at 8:40AM (UTC)

@github-actions github-actions bot added App Viewers Pod This label assigns issues to the app viewers pod Chart Widget Enhancement New feature or request Medium Issues that frustrate users due to poor UX labels Nov 17, 2022
@github-actions
Copy link

Unable to find test scripts. Please add necessary tests to the PR.

jsartisan
jsartisan previously approved these changes Nov 21, 2022
Default color set as primary theme color
@vercel
Copy link

vercel bot commented Nov 23, 2022

Deployment failed with the following error:

Resource is limited - try again in 7 minutes (more than 100, code: "api-deployments-free-per-day").

- Some bug fixes to the series colour feature
@github-actions
Copy link

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Nov 30, 2022
New property placeholderText for ColorPickerComponentV2
Disable series color feature for Pie Chart
Code clean up
@github-actions
Copy link

github-actions bot commented Dec 1, 2022

Unable to find test scripts. Please add necessary tests to the PR.

1 similar comment
@github-actions
Copy link

github-actions bot commented Dec 1, 2022

Unable to find test scripts. Please add necessary tests to the PR.

jsartisan
jsartisan previously approved these changes Dec 2, 2022
@chandannkumar
Copy link

Observation: @souma-ghosh cc: @dilippitchika

@github-actions github-actions bot removed the Stale label Dec 6, 2022
@souma-ghosh
Copy link
Contributor Author

Observation: @souma-ghosh cc: @dilippitchika

This is happening because Fusion chart interprets hex colours differently when the hex is less than 6 digits. This is unpredictable as far as I tested. So we can expect this to work predictably when the series colour hex is 6 characters. Also fusion chart does not support text colours like "red", "green" etc. so the option has been limited to hex code.
We can put some validation to enforce the hex colours to be 6 characters only or think about switching to a different chart widget which can reliably interpret the colours provided. @dilippitchika Could you comment on whether we can move ahead with this?

@dilippitchika
Copy link
Contributor

Ok this is a limitation, please create a new bug for it. Also @souma-ghosh can we support JS in the field?

@souma-ghosh
Copy link
Contributor Author

souma-ghosh commented Dec 7, 2022

@dilippitchika ATM we can't. Since we have implemented the property controls for Chart Series in a bit hacky way. So we will need a refactor there before we can make the Series Color field JS convertible.

@dilippitchika
Copy link
Contributor

Understood, can you please create a new issue for it?

@souma-ghosh
Copy link
Contributor Author

souma-ghosh commented Dec 7, 2022

Here is the issue
#18745

@souma-ghosh
Copy link
Contributor Author

/ok-to-test sha=a199af5

@github-actions
Copy link

github-actions bot commented Dec 7, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3638524348.
Workflow: Appsmith External Integration Test Workflow.
Commit: a199af5.
PR: 18229.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=18229&runId=3638524348_1

@souma-ghosh
Copy link
Contributor Author

/ok-to-test sha=a199af5

@github-actions
Copy link

github-actions bot commented Dec 8, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3646012301.
Workflow: Appsmith External Integration Test Workflow.
Commit: a199af5.
PR: 18229.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=18229&runId=3646012301_1

@chandannkumar
Copy link

chandannkumar commented Dec 9, 2022

Test Plan for Series Colour property of Chart series
https://github.com/appsmithorg/TestSmith/issues/2115

@chandannkumar chandannkumar added the Test Plan Approved Manual/Cypress tests covers changes made on the PR. Else, add skip-testPlan label if not applicable label Dec 9, 2022
@trishaanand trishaanand merged commit 0395457 into release Dec 9, 2022
@trishaanand trishaanand deleted the feat/15522-series-color-for-default-charts branch December 9, 2022 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Viewers Pod This label assigns issues to the app viewers pod Chart Widget Enhancement New feature or request Medium Issues that frustrate users due to poor UX Test Plan Approved Manual/Cypress tests covers changes made on the PR. Else, add skip-testPlan label if not applicable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]-[780]:Add a series color property in default charts
5 participants