Skip to content

Commit ec905cc

Browse files
committed
fix: rename components Base -> Chart, Polar -> PolarArea (#64)
1 parent e84bd77 commit ec905cc

File tree

22 files changed

+93
-75
lines changed

22 files changed

+93
-75
lines changed

.size-limit.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
{
33
"path": "dist/index.cjs",
4-
"limit": "2.6 KB",
4+
"limit": "2.7 KB",
55
"webpack": false,
66
"running": false
77
},
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"path": "dist/index.js",
15-
"limit": "2.6 KB",
15+
"limit": "2.7 KB",
1616
"webpack": false,
1717
"running": false
1818
},

sandboxes/bubble/components/Chart.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
Legend,
1010
PointElement,
1111
LinearScale,
12-
Plugin,
1312
} from 'chart.js';
1413
1514
ChartJS.register(Title, Tooltip, Legend, PointElement, LinearScale);

sandboxes/doughnut/components/Chart.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
Legend,
1010
ArcElement,
1111
CategoryScale,
12-
Plugin,
1312
} from 'chart.js';
1413
1514
ChartJS.register(Title, Tooltip, Legend, ArcElement, CategoryScale);

sandboxes/events/components/Chart.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script>
22
import {
3-
Base as Chart,
3+
Chart,
44
getDatasetAtEvent,
55
getElementAtEvent,
66
getElementsAtEvent,

sandboxes/pie/components/Chart.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script>
2-
import { Pie } from 'svelte-chartjs';
2+
import { Pie } from 'svelte-chartjs';
33
import { data } from './data.js';
44
55
import {
@@ -9,7 +9,6 @@
99
Legend,
1010
ArcElement,
1111
CategoryScale,
12-
Plugin,
1312
} from 'chart.js';
1413
1514
ChartJS.register(Title, Tooltip, Legend, ArcElement, CategoryScale);
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script>
2-
import { Polar } from 'svelte-chartjs';
2+
import { PolarArea } from 'svelte-chartjs';
33
import { data } from './data.js';
44
55
import {
@@ -9,10 +9,9 @@
99
Legend,
1010
ArcElement,
1111
RadialLinearScale,
12-
Plugin,
1312
} from 'chart.js';
1413
1514
ChartJS.register(Title, Tooltip, Legend, ArcElement, RadialLinearScale);
1615
</script>
1716

18-
<Polar {data} options={{ responsive: true }} />
17+
<PolarArea {data} options={{ responsive: true }} />

sandboxes/ref/components/Chart.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script>
22
import { onMount } from 'svelte';
3-
import { Base as Chart } from 'svelte-chartjs';
3+
import { Chart } from 'svelte-chartjs';
44
import { data, options } from './data.js';
55
66
import {

sandboxes/scatter/components/Chart.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
CategoryScale,
1212
LinearScale,
1313
PointElement,
14-
Plugin,
1514
} from 'chart.js';
1615
1716
ChartJS.register(

src/Bar.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<script lang="ts">
22
import type { DefaultDataPoint } from 'chart.js';
33
import { Chart as ChartJS, BarController } from 'chart.js';
4-
import type { ChartProps } from './types';
5-
import Base from './Base.svelte';
4+
import type { ChartBaseProps } from './types';
5+
import Chart from './Chart.svelte';
66
import { useForwardEvents } from './utils';
77
88
interface $$Props<TData = DefaultDataPoint<'bar'>, TLabel = unknown>
9-
extends Omit<ChartProps<'bar', TData, TLabel>, 'type'> {
9+
extends Omit<ChartBaseProps<'bar', TData, TLabel>, 'type'> {
1010
chart: ChartJS<'bar', TData, TLabel> | null;
1111
}
1212
1313
ChartJS.register(BarController);
1414
1515
export let chart: $$Props['chart'] = null;
1616
let props = $$props as $$Props;
17-
let baseRef: Base;
17+
let baseChartRef: Chart;
1818
19-
useForwardEvents(() => baseRef);
19+
useForwardEvents(() => baseChartRef);
2020
</script>
2121

22-
<Base bind:this={baseRef} bind:chart type="bar" {...props} />
22+
<Chart bind:this={baseChartRef} bind:chart type="bar" {...props} />

src/Bubble.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<script lang="ts">
22
import type { DefaultDataPoint } from 'chart.js';
33
import { Chart as ChartJS, BubbleController } from 'chart.js';
4-
import type { ChartProps } from './types';
5-
import Base from './Base.svelte';
4+
import type { ChartBaseProps } from './types';
5+
import Chart from './Chart.svelte';
66
import { useForwardEvents } from './utils';
77
88
interface $$Props<TData = DefaultDataPoint<'bubble'>, TLabel = unknown>
9-
extends Omit<ChartProps<'bubble', TData, TLabel>, 'type'> {
9+
extends Omit<ChartBaseProps<'bubble', TData, TLabel>, 'type'> {
1010
chart: ChartJS<'bubble', TData, TLabel> | null;
1111
}
1212
1313
ChartJS.register(BubbleController);
1414
1515
export let chart: $$Props['chart'] = null;
1616
let props = $$props as $$Props;
17-
let baseRef: Base;
17+
let baseChartRef: Chart;
1818
19-
useForwardEvents(() => baseRef);
19+
useForwardEvents(() => baseChartRef);
2020
</script>
2121

22-
<Base bind:this={baseRef} bind:chart type="bubble" {...props} />
22+
<Chart bind:this={baseChartRef} bind:chart type="bubble" {...props} />

0 commit comments

Comments
 (0)