-
Notifications
You must be signed in to change notification settings - Fork 28
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
Alluvial Chart Colorization Documentation #50
Comments
For color of links you will want to use |
Chris:::
I've reviewed that page. It's still not clear to me how to actually apply the code syntax to a function where color is customized.
Would it be possible to provide an example of an actual applied function, say, the alluvial_diagram function where color is customized?
For example, in the context of the following code syntax, how would color be encoded for customizing the alluvial streams?
x = alluvial_diagram(linkData = hefem, sourceAccessor = "newHair", targetAccessor = "newEye", valueAccessor = "Freq")
I think it is important to highlight that just because there is meta-documentation of the component parts comprising this wonderful function, does not mean that there is connected understanding of how to actually said data argument within a function.
For me, and I'm sure I speak for others in the R community, actually seeing code syntax applied is a much better way to understand the implementation of a new function.
If it is possible, I do think it would be of a tremendous benefit to provide a handful of coding algorithms for each function contained in the visachartR package. I know you have at least one example for most of the functions, but those examples do not capture the essentials elements of the plots they generate.
The example I cite is customizing alluvial streams in the alluvial plot.
Warm regards,
Brice Richard
…________________________________
From: Chris DeMartini ***@***.***>
Sent: Thursday, February 10, 2022 11:29 AM
To: visa/visa-chart-components ***@***.***>
Cc: brichard1638 ***@***.***>; Author ***@***.***>
Subject: Re: [visa/visa-chart-components] Alluvial Chart Colorization Documentation (Issue #50)
For color of links you will want to use linkConfig.fillMode prop provided. You can find it and other documentation on available props in the readme for alluvial here: https://github.com/visa/visa-chart-components/tree/main/packages/alluvial-diagram#link-props
—
Reply to this email directly, view it on GitHub<#50 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ASLI5UNXMLXTRJETYP7W4NLU2PRWBANCNFSM5N5UAC5Q>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi @brichard1638, using the example provided in the documentation, this is how you use a custom color for every source: data.frame(HairEyeColor) |>
dplyr::filter(Sex=="Female") |>
dplyr::mutate(newHair = paste(Hair,"-Hair")) |>
dplyr::mutate(newEye = paste(Eye,"-Eye")) |>
visachartR::alluvial_diagram(sourceAccessor = "newHair",
targetAccessor = "newEye",
valueAccessor = "Freq",
linkConfig = list(visible = TRUE,
fillMode = "source",
opacity = 0.9),
colors = palette.colors(palette = "Set 2")) Note that it's nice to use a color-vision deficiency friendly color palette, see e.g. "A New palette() for R". Also, if you post R code in GitHub issues, please format it accordingly. @chris-demartini In this example it is strange how the table representation of the graph lacks numbers. Is that supposed to happen? |
Florian:::
Thank you very much for the code sample, which includes the application of color customization.
It is much appreciated!
Warm regards,
Brice Richard
…________________________________
From: Florian Kohrt ***@***.***>
Sent: Friday, February 11, 2022 8:48 AM
To: visa/visa-chart-components ***@***.***>
Cc: brichard1638 ***@***.***>; Mention ***@***.***>
Subject: Re: [visa/visa-chart-components] Alluvial Chart Colorization Documentation (Issue #50)
Hi @brichard1638<https://github.com/brichard1638>, using the example provided in the documentation, this is how you use a custom color for every source:
data.frame(HairEyeColor) |>
dplyr::filter(Sex=="Female") |>
dplyr::mutate(newHair = paste(Hair,"-Hair")) |>
dplyr::mutate(newEye = paste(Eye,"-Eye")) |>
visachartR::alluvial_diagram(sourceAccessor = "newHair",
targetAccessor = "newEye",
valueAccessor = "Freq",
linkConfig = list(visible = TRUE,
fillMode = "source",
opacity = 0.9),
colors = palette.colors(palette = "Set 2"))
Note that it's nice to use a color-vision deficiency friendly color palette, see e.g. "A New palette() for R<https://developer.r-project.org/Blog/public/2019/11/21/a-new-palette-for-r/>"., Also, if you post R code in GitHub issues, please format it accordingly<https://yihui.org/issue/#please-format-your-issue-correctly>.
@chris-demartini<https://github.com/chris-demartini> In this example it is strange how the table representation of the graph lacks numbers. Is that supposed to happen?
[visachartR]<https://user-images.githubusercontent.com/12914806/153602563-d62ad01c-968c-46aa-8336-74b059a523ca.png>
—
Reply to this email directly, view it on GitHub<#50 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ASLI5ULWYDMGRGZSE3NYEB3U2UHTLANCNFSM5N5UAC5Q>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
The color question was answered above and the data table bug was fixed with release 6.1.0. closing this item out. |
It is not clear how to change the colorization of the Alluvial streams in an Alluvial chart. Can you provide additional documentation code specific to chart colorization, and more specifically, an Alluvial chart?s? Code samples should be specific, not just a reference made to a general argument list. If it is not possible to change the color, would you consider adding an argument to change alluvial color streams?
The text was updated successfully, but these errors were encountered: