vue-chrts 0.0.132 → 0.0.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/extensions.json +3 -0
- package/auto-imports.d.ts +58 -0
- package/components.d.ts +46 -0
- package/image.png +0 -0
- package/index.html +14 -0
- package/index.js +2 -0
- package/package.json +15 -13
- package/src/components/Area/AreaChart.vue +141 -0
- package/src/components/Area/index.ts +1 -0
- package/src/components/AreaStacked/AreaStackedChart.vue +51 -0
- package/{dist/components/AreaStacked/index.d.ts → src/components/AreaStacked/index.ts} +1 -1
- package/src/components/Bar/BarChart.vue +130 -0
- package/src/components/Bar/index.ts +1 -0
- package/src/components/Crosshair/Crosshair.vue +46 -0
- package/src/components/Crosshair/index.ts +1 -0
- package/src/components/Donut/DonutChart.vue +71 -0
- package/src/components/Donut/index.ts +1 -0
- package/src/components/Line/LineChart.vue +94 -0
- package/src/components/Line/index.ts +1 -0
- package/src/components/Tooltip.vue +17 -0
- package/src/components.ts +6 -0
- package/src/index.ts +6 -0
- package/src/shims-vue.d.ts +1 -0
- package/src-demo/AdminTemplate.vue +5 -0
- package/src-demo/App.vue +37 -0
- package/src-demo/AreaChartPage.vue +125 -0
- package/src-demo/BarChartPage.vue +166 -0
- package/src-demo/DashboardTemplate.vue +687 -0
- package/src-demo/Homepage.vue +325 -0
- package/src-demo/LineChartPage.vue +140 -0
- package/src-demo/assets/main.css +34 -0
- package/src-demo/components/Progress/Progress.vue +42 -0
- package/src-demo/components/Progress/index.ts +1 -0
- package/src-demo/components/Status/Status.vue +95 -0
- package/src-demo/components/Status/index.ts +1 -0
- package/src-demo/components/charts.ts +37 -0
- package/src-demo/components/index.ts +49 -0
- package/src-demo/data/AreaChartData.ts +294 -0
- package/src-demo/data/BarChartData.ts +79 -0
- package/src-demo/data/IncomeExpenseData.ts +189 -0
- package/src-demo/data/InvestmentData.ts +352 -0
- package/src-demo/data/RevenueData.ts +58 -0
- package/src-demo/data/VisitorsData.ts +260 -0
- package/src-demo/elements/Button.vue +13 -0
- package/src-demo/elements/Card.vue +17 -0
- package/src-demo/elements/Dropdown.vue +112 -0
- package/src-demo/elements/Logo.vue +8 -0
- package/src-demo/elements/Table.vue +363 -0
- package/src-demo/elements/TopBar.vue +40 -0
- package/src-demo/index.ts +58 -0
- package/tsconfig.json +11 -0
- package/vite.config.ts +63 -0
- package/dist/components/Area/AreaChart.cjs +0 -7
- package/dist/components/Area/AreaChart.cjs.map +0 -1
- package/dist/components/Area/AreaChart.js +0 -123
- package/dist/components/Area/AreaChart.js.map +0 -1
- package/dist/components/Area/AreaChart.vue.d.ts +0 -37
- package/dist/components/Area/AreaChart2.cjs +0 -2
- package/dist/components/Area/AreaChart2.cjs.map +0 -1
- package/dist/components/Area/AreaChart2.js +0 -5
- package/dist/components/Area/AreaChart2.js.map +0 -1
- package/dist/components/Area/index.d.ts +0 -1
- package/dist/components/AreaStacked/AreaStackedChart.cjs +0 -2
- package/dist/components/AreaStacked/AreaStackedChart.cjs.map +0 -1
- package/dist/components/AreaStacked/AreaStackedChart.js +0 -51
- package/dist/components/AreaStacked/AreaStackedChart.js.map +0 -1
- package/dist/components/AreaStacked/AreaStackedChart.vue.d.ts +0 -18
- package/dist/components/AreaStacked/AreaStackedChart2.cjs +0 -2
- package/dist/components/AreaStacked/AreaStackedChart2.cjs.map +0 -1
- package/dist/components/AreaStacked/AreaStackedChart2.js +0 -5
- package/dist/components/AreaStacked/AreaStackedChart2.js.map +0 -1
- package/dist/components/Bar/BarChart.cjs +0 -2
- package/dist/components/Bar/BarChart.cjs.map +0 -1
- package/dist/components/Bar/BarChart.js +0 -105
- package/dist/components/Bar/BarChart.js.map +0 -1
- package/dist/components/Bar/BarChart.vue.d.ts +0 -37
- package/dist/components/Bar/BarChart2.cjs +0 -2
- package/dist/components/Bar/BarChart2.cjs.map +0 -1
- package/dist/components/Bar/BarChart2.js +0 -5
- package/dist/components/Bar/BarChart2.js.map +0 -1
- package/dist/components/Bar/index.d.ts +0 -1
- package/dist/components/Crosshair/Crosshair.cjs +0 -2
- package/dist/components/Crosshair/Crosshair.cjs.map +0 -1
- package/dist/components/Crosshair/Crosshair.js +0 -40
- package/dist/components/Crosshair/Crosshair.js.map +0 -1
- package/dist/components/Crosshair/Crosshair.vue.d.ts +0 -38
- package/dist/components/Crosshair/Crosshair2.cjs +0 -2
- package/dist/components/Crosshair/Crosshair2.cjs.map +0 -1
- package/dist/components/Crosshair/Crosshair2.js +0 -5
- package/dist/components/Crosshair/Crosshair2.js.map +0 -1
- package/dist/components/Crosshair/index.d.ts +0 -1
- package/dist/components/Donut/DonutChart.cjs +0 -6
- package/dist/components/Donut/DonutChart.cjs.map +0 -1
- package/dist/components/Donut/DonutChart.js +0 -59
- package/dist/components/Donut/DonutChart.js.map +0 -1
- package/dist/components/Donut/DonutChart.vue.d.ts +0 -31
- package/dist/components/Donut/DonutChart2.cjs +0 -2
- package/dist/components/Donut/DonutChart2.cjs.map +0 -1
- package/dist/components/Donut/DonutChart2.js +0 -5
- package/dist/components/Donut/DonutChart2.js.map +0 -1
- package/dist/components/Donut/index.d.ts +0 -1
- package/dist/components/Line/LineChart.cjs +0 -2
- package/dist/components/Line/LineChart.cjs.map +0 -1
- package/dist/components/Line/LineChart.js +0 -85
- package/dist/components/Line/LineChart.js.map +0 -1
- package/dist/components/Line/LineChart.vue.d.ts +0 -28
- package/dist/components/Line/LineChart2.cjs +0 -2
- package/dist/components/Line/LineChart2.cjs.map +0 -1
- package/dist/components/Line/LineChart2.js +0 -5
- package/dist/components/Line/LineChart2.js.map +0 -1
- package/dist/components/Line/index.d.ts +0 -1
- package/dist/components/Tooltip.cjs +0 -2
- package/dist/components/Tooltip.cjs.map +0 -1
- package/dist/components/Tooltip.js +0 -21
- package/dist/components/Tooltip.js.map +0 -1
- package/dist/components/Tooltip.vue.d.ts +0 -14
- package/dist/components/Tooltip2.cjs +0 -2
- package/dist/components/Tooltip2.cjs.map +0 -1
- package/dist/components/Tooltip2.js +0 -5
- package/dist/components/Tooltip2.js.map +0 -1
- package/dist/components.d.ts +0 -6
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -17
- package/dist/index.js.map +0 -1
- /package/{dist → public}/vite.svg +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<script setup lang="ts" generic="T">
|
|
2
|
+
import { computed, createApp } from "vue";
|
|
3
|
+
|
|
4
|
+
import { CurveType, BulletLegendItemInterface, Position } from "@unovis/ts";
|
|
5
|
+
|
|
6
|
+
import Tooltip from "./../Tooltip.vue";
|
|
7
|
+
import { PaginationPosition } from "../..";
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
VisAxis,
|
|
11
|
+
VisBulletLegend,
|
|
12
|
+
VisCrosshair,
|
|
13
|
+
VisLine,
|
|
14
|
+
VisXYContainer,
|
|
15
|
+
VisTooltip,
|
|
16
|
+
} from "@unovis/vue";
|
|
17
|
+
|
|
18
|
+
export type LineChartProps<T> = {
|
|
19
|
+
data: T[];
|
|
20
|
+
height: number;
|
|
21
|
+
xLabel?: string;
|
|
22
|
+
yLabel?: string;
|
|
23
|
+
categories: Record<string, BulletLegendItemInterface>;
|
|
24
|
+
xFormatter: (i: number, idx: number) => string;
|
|
25
|
+
yFormatter?: (i: number, idx: number) => string;
|
|
26
|
+
curveType?: CurveType;
|
|
27
|
+
yNumTicks?: number;
|
|
28
|
+
xNumTicks?: number;
|
|
29
|
+
paginationPosition?: PaginationPosition;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const props = defineProps<LineChartProps<T>>();
|
|
33
|
+
|
|
34
|
+
const color = (key: number) => Object.values(props.categories)[key].color;
|
|
35
|
+
|
|
36
|
+
const generateTooltip = computed(() => (d: T) => {
|
|
37
|
+
const app = createApp(Tooltip, {
|
|
38
|
+
data: d,
|
|
39
|
+
categories: props.categories,
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const container = document.createElement("div");
|
|
43
|
+
app.mount(container);
|
|
44
|
+
|
|
45
|
+
const html = container.innerHTML;
|
|
46
|
+
app.unmount();
|
|
47
|
+
|
|
48
|
+
return html;
|
|
49
|
+
});
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<template>
|
|
53
|
+
<div
|
|
54
|
+
class="space-y-4 flex flex-col"
|
|
55
|
+
:class="{
|
|
56
|
+
'flex-col-reverse': props.paginationPosition === 'top',
|
|
57
|
+
}"
|
|
58
|
+
>
|
|
59
|
+
<VisXYContainer :data="data" :height="height">
|
|
60
|
+
<VisTooltip
|
|
61
|
+
:horizontal-placement="Position.Right"
|
|
62
|
+
:vertical-placement="Position.Top"
|
|
63
|
+
/>
|
|
64
|
+
<template v-for="(i, iKey) in Object.keys(props.categories)" :key="iKey">
|
|
65
|
+
<VisLine
|
|
66
|
+
:x="(_: any, i: number) => i"
|
|
67
|
+
:y="(d: T) => d[i as keyof typeof d]"
|
|
68
|
+
:color="color(iKey)"
|
|
69
|
+
:curve-type="curveType ?? CurveType.MonotoneX"
|
|
70
|
+
/>
|
|
71
|
+
</template>
|
|
72
|
+
<VisAxis
|
|
73
|
+
type="x"
|
|
74
|
+
:tick-format="xFormatter"
|
|
75
|
+
:num-ticks="xNumTicks ?? 4"
|
|
76
|
+
:label="xLabel"
|
|
77
|
+
:label-margin="8"
|
|
78
|
+
:domain-line="false"
|
|
79
|
+
:grid-line="false"
|
|
80
|
+
/>
|
|
81
|
+
<VisAxis
|
|
82
|
+
type="y"
|
|
83
|
+
:num-ticks="yNumTicks ?? 4"
|
|
84
|
+
:tick-format="yFormatter"
|
|
85
|
+
:label="yLabel"
|
|
86
|
+
:domain-line="false"
|
|
87
|
+
/>
|
|
88
|
+
<VisCrosshair color="#666" :template="generateTooltip" />
|
|
89
|
+
</VisXYContainer>
|
|
90
|
+
<div class="flex items center justify-end">
|
|
91
|
+
<VisBulletLegend :items="Object.values(categories)" />
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as LineChart } from './LineChart.vue';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col">
|
|
3
|
+
<template v-for="[key, value] in Object.entries(data)" :key="key">
|
|
4
|
+
<div class="flex items-center mr-2 mt-2">
|
|
5
|
+
<!-- <span class="w-3 h-3 rounded-full bg-[#10b981] mr-2"></span> -->
|
|
6
|
+
<span class="font-semibold capitalize text-white/75">{{ key }}:</span>
|
|
7
|
+
</div>
|
|
8
|
+
<span class="font-normal">{{ value }}</span>
|
|
9
|
+
</template>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script lang="ts" setup generic="T">
|
|
14
|
+
const props = defineProps<{
|
|
15
|
+
data: T;
|
|
16
|
+
}>();
|
|
17
|
+
</script>
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module '*.vue';
|
package/src-demo/App.vue
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
|
|
4
|
+
import { useColorMode } from "@vueuse/core";
|
|
5
|
+
useColorMode();
|
|
6
|
+
|
|
7
|
+
const displayCopyright = computed(() => {
|
|
8
|
+
const currentYear = new Date().getFullYear();
|
|
9
|
+
return `Made with 💚 ~ © ${currentYear} Dennis Adriaansen, Inc. All rights reserved.`;
|
|
10
|
+
});
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div>
|
|
15
|
+
<RouterView />
|
|
16
|
+
<div class="border-t border-border mt-8">
|
|
17
|
+
<div class="max-w-7xl mx-auto py-8 flex items-center justify-between">
|
|
18
|
+
<div v-html="displayCopyright"></div>
|
|
19
|
+
<div>
|
|
20
|
+
<a href="https://x.com/DennisAdriaans" target="_blank">
|
|
21
|
+
<svg
|
|
22
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
23
|
+
viewBox="0 0 30 30"
|
|
24
|
+
width="30px"
|
|
25
|
+
height="30px"
|
|
26
|
+
>
|
|
27
|
+
<path
|
|
28
|
+
fill="currentColor"
|
|
29
|
+
d="M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z"
|
|
30
|
+
/>
|
|
31
|
+
</svg>
|
|
32
|
+
</a>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { AreaChart as BaseArea } from "./../src/components/Area";
|
|
3
|
+
import { AreaStackedChart } from "./../src/components";
|
|
4
|
+
|
|
5
|
+
import Card from "./elements/Card.vue";
|
|
6
|
+
|
|
7
|
+
import { CurveType } from "@unovis/ts";
|
|
8
|
+
import {
|
|
9
|
+
AreaChartData1,
|
|
10
|
+
AreaChartData2,
|
|
11
|
+
AreaChartData3,
|
|
12
|
+
AreaChartData4,
|
|
13
|
+
categories2,
|
|
14
|
+
categories3,
|
|
15
|
+
categories4,
|
|
16
|
+
categories5,
|
|
17
|
+
} from "./data/AreaChartData";
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div class="space-y-8 pb-24 pt-8">
|
|
22
|
+
<div class="max-w-7xl mx-auto space-y-4">
|
|
23
|
+
<div class="mb-8 space-y-4">
|
|
24
|
+
<h1 class="text-4xl font-bold">Area Chart</h1>
|
|
25
|
+
<p class="text-lg font-medium text-gray-500">
|
|
26
|
+
Graph with lines connecting data points and shaded areas between the
|
|
27
|
+
lines and the x-axis.
|
|
28
|
+
</p>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div class="grid grid-cols-3 gap-4 max-w-7xl mx-auto py-4">
|
|
33
|
+
<Card>
|
|
34
|
+
<template #header>
|
|
35
|
+
<h2 class="heading-2">Area Chart multiple lines</h2>
|
|
36
|
+
<!-- <p class="text-gray-500">Website visitors per device</p> -->
|
|
37
|
+
</template>
|
|
38
|
+
<BaseArea
|
|
39
|
+
:data="AreaChartData1"
|
|
40
|
+
:height="200"
|
|
41
|
+
y-label="Number of visits"
|
|
42
|
+
:categories="categories3"
|
|
43
|
+
:x-formatter="(i: number): string => `${AreaChartData1[i].date}`"
|
|
44
|
+
:curve-type="CurveType.MonotoneX"
|
|
45
|
+
/>
|
|
46
|
+
</Card>
|
|
47
|
+
|
|
48
|
+
<Card>
|
|
49
|
+
<template #header>
|
|
50
|
+
<h2 class="text-xl my-2 font-bold">Area Chart with single line</h2>
|
|
51
|
+
</template>
|
|
52
|
+
<BaseArea
|
|
53
|
+
:data="AreaChartData2"
|
|
54
|
+
:height="200"
|
|
55
|
+
x-label="Time"
|
|
56
|
+
y-label="Temperature"
|
|
57
|
+
:categories="categories2"
|
|
58
|
+
:y-num-ticks="4"
|
|
59
|
+
:x-num-ticks="7"
|
|
60
|
+
:x-formatter="(i: number): string => `${AreaChartData2[i].hour}`"
|
|
61
|
+
:curve-type="CurveType.Basis"
|
|
62
|
+
/>
|
|
63
|
+
</Card>
|
|
64
|
+
|
|
65
|
+
<Card>
|
|
66
|
+
<template #header>
|
|
67
|
+
<h2 class="text-xl my-2 font-bold">Area Chart Stacked</h2>
|
|
68
|
+
</template>
|
|
69
|
+
<AreaStackedChart :data="AreaChartData3" :categories="categories4" />
|
|
70
|
+
</Card>
|
|
71
|
+
|
|
72
|
+
<Card>
|
|
73
|
+
<template #header>
|
|
74
|
+
<h2 class="text-xl my-2 font-bold">Area Chart Natrual</h2>
|
|
75
|
+
</template>
|
|
76
|
+
<BaseArea
|
|
77
|
+
:data="AreaChartData4"
|
|
78
|
+
:height="200"
|
|
79
|
+
x-label="Month"
|
|
80
|
+
y-label="Score"
|
|
81
|
+
:categories="categories5"
|
|
82
|
+
:y-num-ticks="4"
|
|
83
|
+
:x-num-ticks="7"
|
|
84
|
+
:x-formatter="(i: number): string => `${AreaChartData2[i].hour}`"
|
|
85
|
+
:curve-type="CurveType.Natural"
|
|
86
|
+
/>
|
|
87
|
+
</Card>
|
|
88
|
+
|
|
89
|
+
<Card>
|
|
90
|
+
<template #header>
|
|
91
|
+
<h2 class="text-xl my-2 font-bold">Area Chart Step</h2>
|
|
92
|
+
</template>
|
|
93
|
+
<BaseArea
|
|
94
|
+
:data="AreaChartData4"
|
|
95
|
+
:height="200"
|
|
96
|
+
x-label="Month"
|
|
97
|
+
y-label="Score"
|
|
98
|
+
:categories="categories5"
|
|
99
|
+
:y-num-ticks="4"
|
|
100
|
+
:x-num-ticks="7"
|
|
101
|
+
:x-formatter="(i: number): string => `${AreaChartData2[i].hour}`"
|
|
102
|
+
:curve-type="CurveType.Step"
|
|
103
|
+
/>
|
|
104
|
+
</Card>
|
|
105
|
+
|
|
106
|
+
<Card>
|
|
107
|
+
<template #header>
|
|
108
|
+
<h2 class="text-xl my-2 font-bold">Area Chart Default</h2>
|
|
109
|
+
</template>
|
|
110
|
+
<BaseArea
|
|
111
|
+
:data="AreaChartData4"
|
|
112
|
+
:height="200"
|
|
113
|
+
x-label="Month"
|
|
114
|
+
y-label="Score"
|
|
115
|
+
:categories="categories5"
|
|
116
|
+
:y-num-ticks="4"
|
|
117
|
+
:x-num-ticks="7"
|
|
118
|
+
:x-formatter="(i: number): string => {
|
|
119
|
+
return `${AreaChartData2[i].hour}`;
|
|
120
|
+
}"
|
|
121
|
+
/>
|
|
122
|
+
</Card>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</template>
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { Orientation } from "@unovis/ts";
|
|
3
|
+
import { BarChart } from "./../src/components";
|
|
4
|
+
|
|
5
|
+
import Card from "./elements/Card.vue";
|
|
6
|
+
|
|
7
|
+
import { VisitorsData, VisitorsCartegories } from "./data/VisitorsData";
|
|
8
|
+
|
|
9
|
+
import { PaginationPosition } from './../src'
|
|
10
|
+
|
|
11
|
+
const RevenueData = [
|
|
12
|
+
{ month: "January", desktop: 186, mobile: 80 },
|
|
13
|
+
{ month: "February", desktop: 305, mobile: 200 },
|
|
14
|
+
{ month: "March", desktop: 237, mobile: 120 },
|
|
15
|
+
{ month: "April", desktop: 73, mobile: 190 },
|
|
16
|
+
{ month: "May", desktop: 209, mobile: 130 },
|
|
17
|
+
{ month: "June", desktop: 214, mobile: 140 },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
const RevenueCategories = {
|
|
21
|
+
desktop: { name: "Desktop", color: "#00dc82" },
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const RevenueCategoriesMultple = {
|
|
25
|
+
desktop: { name: "Desktop", color: "#00dc82" },
|
|
26
|
+
mobile: { name: "Mobile", color: "#156F36" },
|
|
27
|
+
};
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<div class="space-y-8 pb-24 pt-8">
|
|
32
|
+
<div class="max-w-7xl mx-auto space-y-4">
|
|
33
|
+
<div class="mb-8 space-y-4">
|
|
34
|
+
<h1 class="text-4xl font-bold">Bar Chart</h1>
|
|
35
|
+
<p class="text-lg font-medium text-gray-500">
|
|
36
|
+
Bar charts to represent data, with bar lengths proportional to the
|
|
37
|
+
values they represent.
|
|
38
|
+
</p>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div class="grid grid-cols-3 gap-4 max-w-7xl mx-auto py-4">
|
|
43
|
+
<Card>
|
|
44
|
+
<template #header>
|
|
45
|
+
<h2 class="heading-2">Bar Chart Vertical</h2>
|
|
46
|
+
<!-- <p class="text-gray-500">Website visitors per device</p> -->
|
|
47
|
+
</template>
|
|
48
|
+
<BarChart
|
|
49
|
+
:data="RevenueData"
|
|
50
|
+
:height="250"
|
|
51
|
+
:categories="RevenueCategories"
|
|
52
|
+
:y-axis="['desktop']"
|
|
53
|
+
:xNumTicks="6"
|
|
54
|
+
:radius="4"
|
|
55
|
+
:y-formatter="(i: number) => i"
|
|
56
|
+
:x-formatter="(i: number): string => `${RevenueData[i].month }`"
|
|
57
|
+
:pagination-position="PaginationPosition.Top"
|
|
58
|
+
/>
|
|
59
|
+
</Card>
|
|
60
|
+
|
|
61
|
+
<Card>
|
|
62
|
+
<template #header>
|
|
63
|
+
<h2 class="heading-2">Bar Chart Horizontal</h2>
|
|
64
|
+
<!-- <p class="text-gray-500">Website visitors per device</p> -->
|
|
65
|
+
</template>
|
|
66
|
+
<BarChart
|
|
67
|
+
:data="RevenueData"
|
|
68
|
+
:height="250"
|
|
69
|
+
:categories="RevenueCategories"
|
|
70
|
+
:y-axis="['desktop']"
|
|
71
|
+
:xNumTicks="6"
|
|
72
|
+
:radius="4"
|
|
73
|
+
:bar-padding="0"
|
|
74
|
+
:orientation="Orientation.Horizontal"
|
|
75
|
+
:x-formatter="() => ''"
|
|
76
|
+
:y-formatter="(i: number): string => `${RevenueData[i].month }`"
|
|
77
|
+
:pagination-position="PaginationPosition.Top"
|
|
78
|
+
/>
|
|
79
|
+
</Card>
|
|
80
|
+
|
|
81
|
+
<Card>
|
|
82
|
+
<template #header>
|
|
83
|
+
<h2 class="heading-2">Bar Chart Group</h2>
|
|
84
|
+
<!-- <p class="text-gray-500">Website visitors per device</p> -->
|
|
85
|
+
</template>
|
|
86
|
+
<BarChart
|
|
87
|
+
:data="RevenueData"
|
|
88
|
+
:height="250"
|
|
89
|
+
:categories="RevenueCategoriesMultple"
|
|
90
|
+
:y-axis="['desktop', 'mobile']"
|
|
91
|
+
:group-padding="0"
|
|
92
|
+
:bar-padding="0.2"
|
|
93
|
+
:xNumTicks="6"
|
|
94
|
+
:radius="4"
|
|
95
|
+
:y-formatter="(i: number) => i"
|
|
96
|
+
:x-formatter="(i: number): string => `${RevenueData[i].month }`"
|
|
97
|
+
:pagination-position="PaginationPosition.Top"
|
|
98
|
+
/>
|
|
99
|
+
</Card>
|
|
100
|
+
|
|
101
|
+
<Card>
|
|
102
|
+
<template #header>
|
|
103
|
+
<h2 class="heading-2">Bar Chart Stacked</h2>
|
|
104
|
+
<!-- <p class="text-gray-500">Website visitors per device</p> -->
|
|
105
|
+
</template>
|
|
106
|
+
<BarChart
|
|
107
|
+
:data="RevenueData"
|
|
108
|
+
:stacked="true"
|
|
109
|
+
:height="250"
|
|
110
|
+
:categories="RevenueCategoriesMultple"
|
|
111
|
+
:y-axis="['desktop', 'mobile']"
|
|
112
|
+
:group-padding="0"
|
|
113
|
+
:bar-padding="0.2"
|
|
114
|
+
:xNumTicks="6"
|
|
115
|
+
:radius="4"
|
|
116
|
+
:y-formatter="(i: number) => i"
|
|
117
|
+
:x-formatter="(i: number): string => `${RevenueData[i].month }`"
|
|
118
|
+
:pagination-position="PaginationPosition.Top"
|
|
119
|
+
/>
|
|
120
|
+
</Card>
|
|
121
|
+
|
|
122
|
+
<Card>
|
|
123
|
+
<template #header>
|
|
124
|
+
<h2 class="heading-2">Bar Chart Vertical</h2>
|
|
125
|
+
<!-- <p class="text-gray-500">Website visitors per device</p> -->
|
|
126
|
+
</template>
|
|
127
|
+
<BarChart
|
|
128
|
+
:data="VisitorsData.slice(0, 11)"
|
|
129
|
+
:height="250"
|
|
130
|
+
:categories="VisitorsCartegories"
|
|
131
|
+
:y-axis="['visitors']"
|
|
132
|
+
:xNumTicks="1"
|
|
133
|
+
:radius="4"
|
|
134
|
+
:y-formatter="(i: number) => i"
|
|
135
|
+
:x-formatter="(i: number,): string => {
|
|
136
|
+
const date = new Date(VisitorsData[i].date)
|
|
137
|
+
return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear();
|
|
138
|
+
}"
|
|
139
|
+
:pagination-position="PaginationPosition.Top"
|
|
140
|
+
/>
|
|
141
|
+
</Card>
|
|
142
|
+
|
|
143
|
+
<Card>
|
|
144
|
+
<template #header>
|
|
145
|
+
<h2 class="heading-2">Bar Chart Stacked Horizontal</h2>
|
|
146
|
+
<!-- <p class="text-gray-500">Website visitors per device</p> -->
|
|
147
|
+
</template>
|
|
148
|
+
<BarChart
|
|
149
|
+
:data="RevenueData"
|
|
150
|
+
:stacked="true"
|
|
151
|
+
:orientation="Orientation.Horizontal"
|
|
152
|
+
:height="250"
|
|
153
|
+
:categories="RevenueCategoriesMultple"
|
|
154
|
+
:y-axis="['desktop', 'mobile']"
|
|
155
|
+
:group-padding="0"
|
|
156
|
+
:bar-padding="0.2"
|
|
157
|
+
:xNumTicks="6"
|
|
158
|
+
:radius="4"
|
|
159
|
+
:x-formatter="(i: number) => i"
|
|
160
|
+
:y-formatter="(i: number): string => `${RevenueData[i].month }`"
|
|
161
|
+
:pagination-position="PaginationPosition.Top"
|
|
162
|
+
/>
|
|
163
|
+
</Card>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
</template>
|