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

feat(ebay-area-chart): refactor existing area chart to design specs #2358

Merged
merged 17 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sixty-experts-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ebay/ebayui-core": minor
---

Add area chart
26 changes: 24 additions & 2 deletions src/common/charts/shared.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export const chartFontFamily = '"Market Sans", Arial, sans-serif',
backgroundColor = "var(--color-background-primary)",
gridColor = "var(--color-data-viz-grid)",
labelsColor = "var(--color-data-viz-labels)",
legendColor = "var(--color-data-viz-legend)",
labelsColor = "var(--color-foreground-secondary)",
legendColor = "var(--color-foreground-primary)",
legendInactiveColor = "var(--color-data-viz-legend-inactive)",
legendHoverColor = "var(--color-data-viz-legend-hover)",
tooltipBackgroundColor = "var(--color-background-primary)",
Expand Down Expand Up @@ -79,6 +79,7 @@ export const chartFontFamily = '"Market Sans", Arial, sans-serif',
const color = strokeColorMapping[i % strokeColorMapping.length];
series[i].lineColor = color;
series[i].borderColor = color;
series[i].fillOpacity = 1;
}
},
setDonutColors = function (series: any) {
Expand Down Expand Up @@ -110,4 +111,25 @@ export const chartFontFamily = '"Market Sans", Arial, sans-serif',
});

return colors.map((color: any) => color.lineColor);
},
setSeriesMarkerStyles = function (series: Highcharts.PlotAreaOptions[]) {
series.forEach((s, i) => {
s.zIndex = series.length - i;
s.marker = {
symbol: "circle",
lineWidth: 1,
fillColor: "black",
lineColor: "white",
states: {
hover: {
animation: { duration: 0 },
radius: 4,
lineWidth: 2,
},
normal: {
animation: false,
},
},
};
});
};
6 changes: 6 additions & 0 deletions src/components/ebay-area-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@
</h1>

The area chart displays one to five series of data points as an interactive stacked area chart

## Examples and Documentation

- [Storybook](https://ebay.github.io/ebayui-core/?path=/docs/charts-ebay-area-chart)
- [Storybook Docs](https://ebay.github.io/ebayui-core/?path=/docs/charts-ebay-area-chart)
- [Code Examples](https://github.com/eBay/ebayui-core/tree/master/src/components/ebay-area-chart/examples)
143 changes: 0 additions & 143 deletions src/components/ebay-area-chart/area-chart.stories-ignore.ts

This file was deleted.

Loading
Loading