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

alpha value upgradation #95

Merged
merged 6 commits into from
Oct 11, 2024
Merged

Conversation

RishikeshB
Copy link
Contributor

@RishikeshB RishikeshB commented May 8, 2023

Hi,
Thank you @kurkle for this great library! As in issue #93 I'd like to increase chart color intensity for better visualization. For this added 'alpha' value where set alpha value to 1 (alpha:1) the intensity of the chart flow color increases or else by default the color value will be 0.5. This will be helpful when given only two color for large dataset.

Eg: I'm not given alpha value and not given any color for flow, chart takes its default color values has red and green :
code:

data: {
datasets: [{
label: 'My sankey',
data,
}]
},

chart looks like:
alpha=0

Eg: I'm given alpha value as 1 and not given any color for flow, chart takes its default color values has red and green:
code:

data: {
datasets: [{
label: 'My sankey',
data,
alpha:1
}]
},

chart looks like
alpha=1

I'm submitting a PR that proposes a new option.

@stockiNail
Copy link
Contributor

@RishikeshB @kurkle if I may jump in the thread, maybe the best thing is to remove any default alpha color value and delegate the user to decide the colors to apply. Just thinking loud.

@kurkle
Copy link
Owner

kurkle commented May 8, 2023

I agree with @stockiNail, it would be best to remove the .alpha call and use whatever already is in the color provided.

@RishikeshB
Copy link
Contributor Author

but when we remove .alpha call, any of us may required a lite colors to view flow. alpha value will serve better usage switching from dark and light.

@kurkle
Copy link
Owner

kurkle commented May 26, 2023

please remove the added files in dist too

@kurkle
Copy link
Owner

kurkle commented May 26, 2023

Also this should be documented, can you do that too?

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@kurkle kurkle closed this Oct 11, 2024
@kurkle kurkle reopened this Oct 11, 2024
Copy link

@kurkle kurkle linked an issue Oct 11, 2024 that may be closed by this pull request
@kurkle kurkle merged commit d221b8d into kurkle:main Oct 11, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

color gradient options
4 participants