adds the possibility to define border styles for each data point from the series. works for bar, line, area, scatter, pie#1343
Open
kotlyarevskyy wants to merge 1 commit into
Conversation
… styles for data points. Adds logic that allows custom border styles to be defined for each data point in the following charts: Bar, Line, Area, Scatter, Pie/Doughnut charts.
shbernal
added a commit
to shbernal/PptxGenJS
that referenced
this pull request
Jun 11, 2026
Adopts upstream PR gitbrent#1343 with a typed API instead of its loose `styles` object. Adds OptsChartData.pointStyles?: ChartDataPointStyle[] where ChartDataPointStyle = { border?: BorderProps; fill?: HexColor }, index- aligned with values[]. Reusing BorderProps gives 'none'|'dash'|'solid' and bare HexColor for free vs upstream's `{ border: { pt, color:'#rgb' }}`. - Supported: BAR, BAR3D, LINE, AREA, SCATTER, PIE, DOUGHNUT. RADAR is skipped (extra per-point markup historically corrupts the chart). - Centralizes c:dPt generation in makeSeriesDataPointsXml + createChartBorderLine, merging legacy single-series color-vary fills with pointStyles so a point never emits a duplicate <c:idx>. - Pie/doughnut: per-point border overrides chart-level dataBorder. Prerequisite schema-order fixes (exposed by the new validated fixtures): - Relocate bar/scatter color-vary c:dPt to before c:dLbls; CT_BarSer/ CT_ScatterSer require dPt* then dLbls. - Gate c:invertIfNegative to bar-only; it is absent from CT_AreaSer. Schema fixtures: bar/pie/line/area/scatter-chart-point-styles. Closes upstream-pr-1343.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new 'styles' property to the OptsChartData interface to define styles for data points.
Adds logic that allows custom border styles to be defined for each data point in the following charts: Bar, Line, Area, Scatter, Pie/Doughnut charts.
the data array would look like this, e.g: