Skip to content

Commit 5362b88

Browse files
committed
improve livedemo charts
1 parent 6f8fa48 commit 5362b88

File tree

7 files changed

+28
-29
lines changed

7 files changed

+28
-29
lines changed

adminforth/documentation/docs/tutorial/03-Customization/14-afcl.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
```
2+
image: "afcl-preview.png" # Path to the OG image
3+
```
4+
15
# AdminForth Components Library
26

3-
AFCL is a set of components which you can use as build blocks.
7+
AFCL is a set of components which you can use as build blocks in your AdminForth application.
48
AFCL allows to keep the design consistent with minimal efforts and build new pages faster.
59
AFCL components follow styling standard and respect theme colors.
610

@@ -168,11 +172,10 @@ You can customize item and selected item using slots.
168172
//diff-add
169173
</template>
170174
</Select>
171-
</div>
172175
```
173176
</div>
174177
<div>
175-
![AFCL Select custom template](image-44.png)
178+
![AFCL Select custom item](image-79.png)
176179
</div>
177180
</div>
178181

@@ -296,7 +299,7 @@ import { IconGridSolid, IconUserCircleSolid } from '@iconify-prerendered/vue-flo
296299
```
297300
</div>
298301
<div>
299-
![AFCL VerticalTabs](image-48.png)
302+
![AFCL VerticalTabs](image-77.png)
300303
</div>
301304
</div>
302305

@@ -454,7 +457,7 @@ const isoFlagToEmoji = (iso) => iso.toUpperCase().replace(/./g, char => String.f
454457
```
455458
</div>
456459
<div>
457-
![AFCL Table with custom cell](image-53.png)
460+
![AFCL Table with custom cell](image-78.png)
458461
</div>
459462
</div>
460463

285 KB
Loading
35.6 KB
Loading
26.4 KB
Loading
44.1 KB
Loading

dev-demo/custom/Dash.vue

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -162,31 +162,26 @@
162162

163163
<div class="flex justify-center items-center p-80 bg-white">
164164
<div class="border border-indigo-600 p-5 w-80 h-80 min-w-80 min-h-80 flex items-center flex-col">
165-
<PieChart
166-
:data="[
167-
{ amount: 5, label: 'Cars'},
168-
{ amount: 3, label: 'Bikes'},
169-
{ amount: 2, label: 'Trucks'},
170-
{ amount: 1, label: 'Boats'},
165+
<Select
166+
class="w-full"
167+
:options="[
168+
{label: 'Last 7 days', value: '7', records: 110},
169+
{label: 'Last 30 days', value: '30', records: 320},
170+
{label: 'Last 90 days', value: '90', records: 310},
171+
{label: 'None', value: null}
171172
]"
172-
:options="{
173-
chart: {
174-
height: 250,
175-
},
176-
dataLabels: {
177-
enabled: true,
178-
},
179-
plotOptions: {
180-
pie: {
181-
dataLabels: {
182-
offset: -10, // Moves labels closer to or further from the slices
183-
minAngleToShowLabel: 10, // Ensures that small slices don’t show labels
184-
},
185-
expandOnClick: true,
186-
},
187-
},
188-
}"
189-
/>
173+
v-model="selected"
174+
>
175+
<template #item="{option}">
176+
<div>
177+
<span>{{ option.label }}</span>
178+
<span class="ml-2 opacity-50">{{ option.records }} records</span>
179+
</div>
180+
</template>
181+
<template #selected-item="{option}">
182+
<span>{{ option.label }} 💫</span>
183+
</template>
184+
</Select>
190185
</div>
191186
</div>
192187
</div>

live-demo/app/custom/Dashboard.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
<PieChart
111111
:data="apartsCountsByRooms"
112112
:options="{
113+
chart: { type: 'donut' },
113114
plotOptions: {
114115
pie: {
115116
donut: {

0 commit comments

Comments
 (0)