Skip to content

Commit a41281c

Browse files
committed
Add changelog
1 parent f4973e3 commit a41281c

File tree

7 files changed

+19
-20
lines changed

7 files changed

+19
-20
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: removed
3+
4+
Remove Woo and Jetpack themes

projects/js-packages/charts/src/components/conversion-funnel-chart/test/conversion-funnel-chart.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ describe( 'ConversionFunnelChart', () => {
310310
renderWithoutTheme( <ConversionFunnelChart { ...defaultProps } changeIndicator="+5.2%" /> );
311311

312312
const changeElement = screen.getByText( '+5.2%' );
313-
// Note: The exact color value depends on the theme (Woo theme colors)
314313
// Color is applied via CSS variable, so check that element exists
315314
expect( changeElement ).toBeInTheDocument();
316315
} );

projects/js-packages/charts/src/components/line-chart/stories/annotation.docs.mdx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The Line Chart component supports a compound component pattern for annotations,
1515

1616
<Source
1717
language="jsx"
18-
code={ `import { LineChart } from '@automattic/jetpack-charts';
18+
code={ `import { LineChart } from '@automattic/charts';
1919
2020
<LineChart data={ data }>
2121
<LineChart.AnnotationsOverlay>
@@ -198,16 +198,12 @@ Controls the text label appearance:
198198

199199
### Theme Integration
200200

201-
Annotations inherit styling from your chart theme. Default themes provide consistent styling:
202-
203-
- **Jetpack Theme**: Gray colors with subtle styling
204-
- **Woo Theme**: Black accents for higher contrast
205-
- **Custom Themes**: Define `annotationStyles` in your theme object
201+
Annotations inherit styling from your chart theme. You can customize annotation styles by defining `annotationStyles` in your theme object:
206202

207203
<Source
208204
language="jsx"
209205
code={ `const customTheme = {
210-
...jetpackTheme,
206+
...defaultTheme,
211207
annotationStyles: {
212208
label: {
213209
backgroundFill: '#f0f8ff',

projects/js-packages/charts/src/components/line-chart/stories/glyph.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const meta: Meta< StoryArgs > = {
5656
...lineChartMetaArgs.argTypes,
5757
themeName: {
5858
...themeArgTypes.themeName,
59-
options: [ 'default', 'jetpack', 'woo', 'custom', 'glyph' ],
59+
options: [ 'default', 'custom', 'glyph' ],
6060
},
6161
withStartGlyphs: {
6262
control: 'boolean',

projects/js-packages/charts/src/components/line-chart/test/line-chart.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe( 'LineChart', () => {
5050
],
5151
};
5252

53-
const renderWithTheme = ( props = {}, themeName = 'jetpack' ) => {
53+
const renderWithTheme = ( props = {}, themeName = 'default' ) => {
5454
const theme = THEME_MAP[ themeName ];
5555

5656
return render(
@@ -61,7 +61,7 @@ describe( 'LineChart', () => {
6161
);
6262
};
6363

64-
const renderUnwrappedWithTheme = ( props = {}, themeName = 'jetpack', ref = undefined ) => {
64+
const renderUnwrappedWithTheme = ( props = {}, themeName = 'default', ref = undefined ) => {
6565
const theme = THEME_MAP[ themeName ];
6666

6767
return render(
@@ -792,7 +792,7 @@ describe( 'LineChart', () => {
792792
describe( 'Chart Ref Interface', () => {
793793
test( 'exposes getScales method via ref', () => {
794794
const ref = createRef< SingleChartRef >();
795-
renderUnwrappedWithTheme( {}, 'jetpack', ref );
795+
renderUnwrappedWithTheme( {}, 'default', ref );
796796

797797
expect( ref.current?.getScales() ).toBeDefined();
798798
expect( ref.current?.getScales()?.xScale ).toBeDefined();
@@ -801,7 +801,7 @@ describe( 'LineChart', () => {
801801

802802
test( 'exposes getChartDimensions method via ref', () => {
803803
const ref = createRef< SingleChartRef >();
804-
renderUnwrappedWithTheme( { width: 800, height: 400 }, 'jetpack', ref );
804+
renderUnwrappedWithTheme( { width: 800, height: 400 }, 'default', ref );
805805

806806
const dimensions = ref.current?.getChartDimensions();
807807
expect( dimensions?.width ).toBe( 800 );
@@ -813,7 +813,7 @@ describe( 'LineChart', () => {
813813
const renderWithAnnotations = (
814814
children: React.ReactNode,
815815
props = {},
816-
themeName = 'jetpack'
816+
themeName = 'default'
817817
) => {
818818
const theme = THEME_MAP[ themeName ];
819819

projects/js-packages/charts/src/components/pie-chart/stories/donut.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ export const CustomLegendPositioning: Story = {
392392
},
393393
};
394394

395-
const WooPieLegend = ( {
395+
const CustomPieLegend = ( {
396396
chartItems,
397397
items,
398398
withComparison,
@@ -443,7 +443,7 @@ export const CustomLegend: Story = {
443443
<PieChartUnresponsive.Legend
444444
// eslint-disable-next-line react/jsx-no-bind
445445
render={ items => (
446-
<WooPieLegend
446+
<CustomPieLegend
447447
chartItems={ items }
448448
items={ customerRevenueLegendData }
449449
withComparison={ args.withComparison }

projects/js-packages/charts/src/stories/index.docs.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A comprehensive charting library for displaying interactive data visualizations
99
## Features
1010

1111
-**Rich Chart Types** - Bar charts, bar list charts, conversion funnel charts, donut charts, leaderboard visualizations, line charts, and pie charts
12-
- 🎨 **Themeable** - Built-in themes for Jetpack and WooCommerce with custom theme support
12+
- 🎨 **Themeable** - Built-in default theme with custom theme support
1313
- 📱 **Responsive** - Automatically adapts to container size and viewport changes
1414
-**Accessible** - Full keyboard navigation, screen reader support, and ARIA compliance
1515
- 🔧 **Compound Components** - Flexible API using compound component patterns for advanced features
@@ -32,7 +32,7 @@ yarn add @automattic/charts
3232

3333
<Source
3434
language="jsx"
35-
code={`import { LineChart, GlobalChartsProvider, jetpackTheme } from '@automattic/charts';
35+
code={`import { LineChart, GlobalChartsProvider } from '@automattic/charts';
3636
3737
const data = [
3838
{
@@ -48,7 +48,7 @@ yarn add @automattic/charts
4848
4949
function MyChart() {
5050
return (
51-
<GlobalChartsProvider theme={jetpackTheme}>
51+
<GlobalChartsProvider>
5252
<LineChart data={data} />
5353
</GlobalChartsProvider>
5454
);
@@ -84,7 +84,7 @@ Great for showing parts of a whole, with customizable thickness and gap spacing.
8484
Charts expect data in a standardized format with `date` (for time-series) or category values and numeric `value` properties.
8585

8686
### Theme System
87-
Use the `GlobalChartsProvider` component to apply consistent styling across all charts. Supports Jetpack and WooCommerce themes out of the box.
87+
Use the `GlobalChartsProvider` component to apply consistent styling across all charts with support for custom themes.
8888

8989
### Responsive Design
9090
All charts automatically adapt to their container size using the `withResponsive` higher-order component.

0 commit comments

Comments
 (0)