|
11 | 11 | timeYear, |
12 | 12 | timeMillisecond, |
13 | 13 | } from 'd3-time'; |
14 | | - import { Field, RangeField, Switch } from 'svelte-ux'; |
| 14 | + import { RangeField } from 'svelte-ux'; |
15 | 15 |
|
16 | 16 | import Preview from '$lib/docs/Preview.svelte'; |
17 | 17 |
|
|
52 | 52 |
|
53 | 53 | let tickSpacing = $state(80); // x-axis default |
54 | 54 |
|
55 | | - let debug = $state(false); |
| 55 | + let debug = $derived(shared.debug); |
56 | 56 | </script> |
57 | 57 |
|
58 | 58 | <h1>Examples</h1> |
|
454 | 454 | </div> |
455 | 455 | </Preview> |
456 | 456 |
|
457 | | -<div class="grid grid-cols-[1fr_auto] gap-2 items-end"> |
458 | | - <h2>Axis label placements (top/bottom)</h2> |
459 | | - |
460 | | - <div class="mb-2 flex gap-6"> |
461 | | - <Field label="Debug:" dense labelPlacement="left" let:id> |
462 | | - <Switch {id} bind:checked={debug} /> |
463 | | - </Field> |
464 | | - </div> |
465 | | -</div> |
| 457 | +<h2>Axis label placements (top/bottom)</h2> |
466 | 458 |
|
467 | 459 | <Preview> |
468 | 460 | <div class="h-[300px] p-4 border rounded-sm"> |
|
489 | 481 | </div> |
490 | 482 | </Preview> |
491 | 483 |
|
492 | | -<div class="grid grid-cols-[1fr_auto] gap-2 items-end"> |
493 | | - <h2>Axis label placements (left/right)</h2> |
494 | | - |
495 | | - <div class="mb-2 flex gap-6"> |
496 | | - <Field label="Debug:" dense labelPlacement="left" let:id> |
497 | | - <Switch {id} bind:checked={debug} /> |
498 | | - </Field> |
499 | | - </div> |
500 | | -</div> |
| 484 | +<h2>Axis label placements (left/right)</h2> |
501 | 485 |
|
502 | 486 | <Preview> |
503 | 487 | <div class="h-[300px] p-4 border rounded-sm"> |
|
520 | 504 | </div> |
521 | 505 | </Preview> |
522 | 506 |
|
523 | | -<div class="grid grid-cols-[1fr_auto] gap-2 items-end"> |
524 | | - <h2>Multiple time axis with same placement (bottom)</h2> |
525 | | - |
526 | | - <div class="mb-2 flex gap-6"> |
527 | | - <Field label="Debug:" dense labelPlacement="left" let:id> |
528 | | - <Switch {id} bind:checked={debug} /> |
529 | | - </Field> |
530 | | - </div> |
531 | | -</div> |
| 507 | +<h2>Multiple time axis with same placement (bottom)</h2> |
532 | 508 |
|
533 | 509 | <Preview> |
534 | 510 | <div class="h-[80px] p-4 border rounded-sm"> |
|
579 | 555 | </div> |
580 | 556 | </Preview> |
581 | 557 |
|
582 | | -<div class="grid grid-cols-[1fr_auto] gap-2 items-end"> |
583 | | - <h2>Multiple different axis with same placement (right)</h2> |
584 | | - |
585 | | - <div class="mb-2 flex gap-6"> |
586 | | - <Field label="Debug:" dense labelPlacement="left" let:id> |
587 | | - <Switch {id} bind:checked={debug} /> |
588 | | - </Field> |
589 | | - </div> |
590 | | -</div> |
| 558 | +<h2>Multiple different axis with same placement (right)</h2> |
591 | 559 |
|
592 | 560 | <Preview> |
593 | 561 | <div class="h-[300px] p-4 border rounded-sm"> |
|
0 commit comments