File tree Expand file tree Collapse file tree
packages/layerchart/src/routes/docs/examples/RadialLine Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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' ;
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 >
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 >
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 >
You can’t perform that action at this time.
0 commit comments