55 A component for displaying line charts with smooth curves and interactive tooltips.
66 </template >
77 </PageHeader >
8-
8+ <p class =" charts__description" >
9+ Select a time period using the first dropdown (e.g., last hour, day, week, or month).
10+ The second dropdown controls how data is grouped within that period (by minutes, hours, or days).
11+ </p >
912 <Heading :level =" 3" >
1013 Single Line Chart
1114 </Heading >
1215
1316 <div class =" charts" >
17+ <div class =" charts__controls" >
18+ <Select
19+ v-model =" singleRangeSelected"
20+ :align =" { vertically: 'below', horizontally: 'left' }"
21+ :is-disabled =" false"
22+ :items =" singleRangeItems"
23+ />
24+ <Select
25+ :key =" singleChartRange"
26+ v-model =" singleGroupingSelected"
27+ :align =" { vertically: 'below', horizontally: 'left' }"
28+ :is-disabled =" false"
29+ :items =" singleGroupingItems"
30+ />
31+ </div >
1432 <div class =" charts__showcase" >
15- <div class =" charts__controls" >
16- <Select
17- v-model =" singleRangeSelected"
18- :align =" { vertically: 'below', horizontally: 'left' }"
19- :is-disabled =" false"
20- :items =" singleRangeItems"
21- />
22- <Select
23- :key =" singleChartRange"
24- v-model =" singleGroupingSelected"
25- :align =" { vertically: 'below', horizontally: 'left' }"
26- :is-disabled =" false"
27- :items =" singleGroupingItems"
28- />
29- </div >
3033 <Chart
3134 :lines =" [singleLineData]"
3235 :detalization =" singleChartGrouping"
3942 </Heading >
4043
4144 <div class =" charts" >
45+ <div class =" charts__controls" >
46+ <Select
47+ v-model =" multiRangeSelected"
48+ :align =" { vertically: 'below', horizontally: 'left' }"
49+ :is-disabled =" false"
50+ :items =" multiRangeItems"
51+ />
52+ <Select
53+ :key =" multiChartRange"
54+ v-model =" multiGroupingSelected"
55+ :align =" { vertically: 'below', horizontally: 'left' }"
56+ :is-disabled =" false"
57+ :items =" multiGroupingItems"
58+ />
59+ </div >
4260 <div class =" charts__showcase" >
43- <div class =" charts__controls" >
44- <Select
45- v-model =" multiRangeSelected"
46- :align =" { vertically: 'below', horizontally: 'left' }"
47- :is-disabled =" false"
48- :items =" multiRangeItems"
49- />
50- <Select
51- :key =" multiChartRange"
52- v-model =" multiGroupingSelected"
53- :align =" { vertically: 'below', horizontally: 'left' }"
54- :is-disabled =" false"
55- :items =" multiGroupingItems"
56- />
57- </div >
5861 <Chart
5962 :lines =" multipleLinesData"
6063 :detalization =" multiChartGrouping"
@@ -423,14 +426,12 @@ watch(multiChartRange, (newRange) => {
423426 grid-template-columns : 1fr ;
424427 gap : var (--spacing-l );
425428 margin-bottom : var (--spacing-xl );
429+ position : relative ;
426430
427431 &__showcase {
428- position : relative ;
429432 width : 100% ;
430- height : 250px ;
431433 background-color : var (--base--bg-secondary );
432434 border-radius : var (--radius-m );
433- padding : var (--spacing-m );
434435 }
435436
436437 &__controls {
@@ -446,5 +447,11 @@ watch(multiChartRange, (newRange) => {
446447 display : flex ;
447448 gap : var (--spacing-s );
448449 }
450+
451+ &__description {
452+ margin-bottom : var (--spacing-m );
453+ color : var (--base--text-secondary );
454+
455+ }
449456}
450457 </style >
0 commit comments