Allow specifying curve
and other props on LineSeries in LineChart component
#41253
Labels
[Experiment] AI labels added
[JS Package] Charts
[Pri] Normal
[Type] Enhancement
Changes to an existing feature — removing, adding, or changing parts of it
Impacted plugin
None / Other
What
I would like to have different curve property for the line series when I use the LineChart component.
How
Currently the line series in the LineChart component is built like this:
jetpack/projects/js-packages/charts/src/components/line-chart/line-chart.tsx
Lines 150 to 157 in 92cd80b
The LineChart uses the default curveLinear factory (see https://airbnb.io/visx/docs/xychart#AnimatedLineSeries_curve). There isn't a way to specify a different curve factory.
In WooCommerce Analytics, we would like to have a different curve - see design screenshot below:
The above can be done manually by doing something like this:
It would be good if the LineChart component can support different curves. Even better if it can support other LineSeries properties (not just
curve
), such asstrokeWidth
which is currently hardcoded with the value2
.The text was updated successfully, but these errors were encountered: