File tree Expand file tree Collapse file tree
packages/layerchart/src/routes/docs/components/Axis Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5555
5656 let renderContext: ' svg' | ' canvas' = $state (' svg' );
5757 let debug = $state (false );
58- const { mdScreen } = new MediaQueryPresets ();
5958 </script >
6059
6160<h1 >Examples</h1 >
483482 </div >
484483</Preview >
485484
486- <h2 >tick count (responsive)</h2 >
487-
488- <Preview >
489- <div class =" h-[300px] p-4 border rounded-sm" >
490- <Chart
491- x =" date"
492- xScale ={scaleTime ()}
493- xDomain ={[timeDay .offset (now , - 10 ), now ]}
494- y =" value"
495- yDomain ={[0 , 100 ]}
496- yNice
497- padding ={{ top : 20 , bottom : 20 , left : 20 , right : 20 }}
498- >
499- <Layer type ={renderContext }>
500- <Axis placement ="bottom" rule ticks ={mdScreen .current ? 10 : 5 } />
501- <Axis placement =" left" rule />
502- </Layer >
503- </Chart >
504- </div >
505- </Preview >
506-
507485<h2 >remove default tick count</h2 >
508486
509487<Preview >
You can’t perform that action at this time.
0 commit comments