Skip to content

Commit 8ae2a3c

Browse files
committed
Refine examples
1 parent c2b549a commit 8ae2a3c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • packages/layerchart/src/routes/docs/examples/RadialLine

packages/layerchart/src/routes/docs/examples/RadialLine/+page.svelte

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { scaleLinear, scaleRadial, scaleUtc } from 'd3-scale';
33
import { flatGroup, max, min, range } from 'd3-array';
44
import { curveLinearClosed, curveCatmullRomClosed, curveCatmullRom } from 'd3-shape';
5-
import { cls } from 'svelte-ux';
5+
import { PeriodType, cls } from 'svelte-ux';
66
77
import Chart, { Svg } from '$lib/components/Chart.svelte';
88
import Area from '$lib/components/Area.svelte';
@@ -61,8 +61,8 @@
6161
curve={curveCatmullRomClosed}
6262
class="fill-primary/20"
6363
/>
64-
<Axis placement="angle" grid />
65-
<Axis placement="radius" grid />
64+
<Axis placement="angle" grid format={PeriodType.Month} />
65+
<Axis placement="radius" rule grid format={(v) => v + '° F'} />
6666
</Group>
6767
</Svg>
6868
</Chart>
@@ -81,6 +81,7 @@
8181
_yDomain={[50, 65]}
8282
_yRange={({ height }) => [0, height / 2]}
8383
yRange={({ height }) => [height / 5, height / 2]}
84+
yPadding={[0, 20]}
8485
>
8586
<Svg>
8687
<Group center>
@@ -100,7 +101,7 @@
100101
/>
101102
{/each}
102103
<Axis placement="angle" grid ticks={range(12).map((x) => x * 30)} />
103-
<Axis placement="radius" grid format={(d) => ''} />
104+
<Axis placement="radius" grid rule ticks={4} format={(v) => v + '° F'} />
104105
</Group>
105106
</Svg>
106107
</Chart>

0 commit comments

Comments
 (0)