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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

RishikeshB
Copy link

@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
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.

.gitignore Outdated Show resolved Hide resolved
@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

sonarcloud bot commented Jan 23, 2024

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

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.

None yet

4 participants