FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add Chart.Residual – Modified Lollipop Chart Implementation by LibraChris · Pull Request #493 · plotly/Plotly.NET · GitHub

Add Chart.Residual – Modified Lollipop Chart Implementation - #493

Merged
kMutagene merged 6 commits into
plotly:devfrom
LibraChris:lollipop_chart
Aug 9, 2025
Merged

Add Chart.Residual – Modified Lollipop Chart Implementation#493
kMutagene merged 6 commits into
plotly:devfrom
LibraChris:lollipop_chart

Conversation

Copy link
Copy Markdown
Contributor

Description:

This PR adds Chart.Residual, a customized variant of the Lollipop chart (see #417) tailored for showcasing deviation of values to a reference values.

Key updates:

  • Add Chart.Residual to ChartAPI/Chart2D
  • Add Basic documentation and usage examples under DISTRIBUTION CHARTS.

kMutagene left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks great, but please do not set any defaults for legend grouping, see comments

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

rename to just "residual.fsx", as the path will then be /distribution-charts/residual.html on the hosted docs

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

also, add it to the 04_distribution-charts solution folder

Comment thread src/Plotly.NET/ChartAPI/Chart2D.fs Outdated
)
|> GenericChart.mapTrace (
Trace2DStyle.Scatter(
LegendGroup = (defaultArg GroupName "Datapoints"),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

To clarify from comment above, just pass ?LegendGroup = GroupName, so the userchoice is respected, but no default is set. Same for any other legend group settings.

Comment thread src/Plotly.NET/ChartAPI/Chart2D.fs Outdated
reference: seq<#IConvertible>,
?Name: string,
?ReferenceName: string,
?GroupName: string,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think grouping the legend items here is unnecessary, as we will have one trace per group per default, and also same name for reference line and group:

please refactor so that, if no group names are set by the user, no trace grouping is done.

- Renamed docs "residual-charts.fsx" to "residual.fsx"
- Added residual.fsx to the 04_distribution-charts solution folder
- Avoid default grouping when legend groups are not given

Copy link
Copy Markdown
Contributor Author

@kMutagene I addressed the requested changes, please have a look.

Comment thread src/Plotly.NET/ChartAPI/Chart2D.fs Outdated
LegendGroup = (defaultArg GroupName "Reference Line"),
LegendGroupTitle = (Title.init (Text = (defaultArg GroupName "Reference Line")))
?LegendGroup = LegendGroupReference,
?LegendGroupTitle = if LegendGroupReference.IsSome then Some (Title.init (Text = LegendGroupReference.Value)) else None

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Either make the title a separate argument or leave it out here. this still injects defaults not visible to the user, and might actually clash if i want to assign an already existing legendgroup that has a different title.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@kMutagene Removed the LegendGroupTitle

Remove LegendGroupTitle to avoid unintended default injection
kMutagene merged commit fd4fa85 into plotly:dev Aug 9, 2025
6 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL