Skip to content

Commit 7b01994

Browse files
committed
Dev environment - Update VueUiXy testing arena
1 parent e02bdaf commit 7b01994

File tree

2 files changed

+69
-46
lines changed

2 files changed

+69
-46
lines changed

TestingArena/ArenaVueUiXy.vue

Lines changed: 68 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -42,54 +42,64 @@ function createDs(n,m=100) {
4242
// ]
4343
// })
4444
45-
// const dataset = ref([
46-
// {
47-
// name: "Curved",
48-
// series: createDs(12),
49-
// type: "bar",
50-
// smooth: true,
51-
// useArea: true,
52-
// dataLabels: false,
53-
// },
54-
// ])
55-
5645
const dataset = ref([
57-
{
58-
name: 'Donut Devourers - Happiness (%)',
59-
type: 'line',
60-
dataLabels: true,
61-
scaleLabel: 'percentage', // Share scale with other percentage-based series
62-
series: [92.34, 88.37, 95.00] // Example percentages across different days
63-
},
64-
{
65-
name: 'Donut Devourers - Donuts Eaten',
66-
type: 'bar',
67-
dataLabels: true,
68-
scaleLabel: 'total', // Share scale with other total-based series
69-
series: [12, 15, 13] // Example counts per day
70-
},
71-
{
72-
name: 'Pizza Party - Cheesy Delight (%)',
73-
type: 'line',
74-
dataLabels: true,
75-
scaleLabel: 'percentage',
76-
series: [75.12, 80.50, 78.34]
77-
},
78-
{
79-
name: 'Pizza Party - Slices Consumed',
80-
type: 'bar',
81-
dataLabels: true,
82-
scaleLabel: 'total',
83-
series: [8, 9, 10]
84-
},
85-
{
86-
name: 'Lone series ',
87-
type: 'bar',
88-
dataLabels: true,
89-
series: [8, 9, 100]
90-
}
46+
{
47+
name: "Curved",
48+
series: createDs(120),
49+
type: "plot",
50+
smooth: false,
51+
useArea: true,
52+
useTag: 'start',
53+
dataLabels: false,
54+
},
55+
{
56+
name: "Curved",
57+
series: createDs(120),
58+
type: "line",
59+
smooth: false,
60+
useArea: true,
61+
useTag: 'end',
62+
dataLabels: false,
63+
},
9164
])
9265
66+
// const dataset = ref([
67+
// {
68+
// name: 'Donut Devourers - Happiness (%)',
69+
// type: 'line',
70+
// dataLabels: true,
71+
// scaleLabel: 'percentage', // Share scale with other percentage-based series
72+
// series: [92.34, 88.37, 95.00] // Example percentages across different days
73+
// },
74+
// {
75+
// name: 'Donut Devourers - Donuts Eaten',
76+
// type: 'bar',
77+
// dataLabels: true,
78+
// scaleLabel: 'total', // Share scale with other total-based series
79+
// series: [12, 15, 13] // Example counts per day
80+
// },
81+
// {
82+
// name: 'Pizza Party - Cheesy Delight (%)',
83+
// type: 'line',
84+
// dataLabels: true,
85+
// scaleLabel: 'percentage',
86+
// series: [75.12, 80.50, 78.34]
87+
// },
88+
// {
89+
// name: 'Pizza Party - Slices Consumed',
90+
// type: 'bar',
91+
// dataLabels: true,
92+
// scaleLabel: 'total',
93+
// series: [8, 9, 10]
94+
// },
95+
// {
96+
// name: 'Lone series ',
97+
// type: 'bar',
98+
// dataLabels: true,
99+
// series: [8, 9, 100]
100+
// }
101+
// ])
102+
93103
94104
// const dataset = ref([
95105
// {
@@ -408,6 +418,9 @@ const model = ref([
408418
{ key: 'line.dot.fill', def: '#FFFFFF', type: 'color'},
409419
{ key: 'line.dot.strokeWidth', def: 2, type: 'number', min: 0, max:12, step: 0.1},
410420
421+
{ key: 'line.tag.followValue', def: true, type: 'checkbox'},
422+
{ key: 'line.tag.fontSize', def: 14, type: 'number' },
423+
411424
{ key: 'plot.radius', def: 6, type: 'number', min: 0, max: 20, label: 'radius', category: 'plot' },
412425
{ key: 'plot.useGradient', def: true, type: 'checkbox', label: 'useGradient', category: 'plot' },
413426
{ key: 'plot.strokeWidth', def: 2, type: 'number', min: 1, max: 20, label: 'thickness', category: 'plot' },
@@ -420,6 +433,9 @@ const model = ref([
420433
{ key: 'plot.dot.fill', def: '#FFFFFF', type: 'color'},
421434
{ key: 'plot.dot.strokeWidth', def: 0.5, type: 'number', min: 0, max:12, step: 0.1},
422435
436+
{ key: 'plot.tag.followValue', def: true, type: 'checkbox'},
437+
{ key: 'plot.tag.fontSize', def: 14, type: 'number' },
438+
423439
{ key: 'showTable', def: false, type: 'checkbox', label: 'show', category: 'table' },
424440
{ key: 'table.responsiveBreakpoint', def: 400, type: 'number', min: 350, max: 800, label: 'responsiveBreakpoint', category: 'table' },
425441
{ key: 'table.rounding', def: 0, type: 'number', min: 0, max: 6, label: 'rounding', category: 'table' },
@@ -500,6 +516,13 @@ const config = computed(() => {
500516
// formatter: ({value, config}) => {
501517
// return `f - ${value}`
502518
// }
519+
},
520+
tag: {
521+
formatter: ({ value, config }) => {
522+
const { datapoint, seriesIndex, serieName } = config;
523+
console.log(datapoint, seriesIndex, serieName)
524+
return `<div>${serieName}: <b>${value.toFixed(2)}</b></div>`
525+
}
503526
}
504527
},
505528
plot: {

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ const components = ref([ //------|
120120
* Modify the index to display a component
121121
* [0] = VueUiXy
122122
*/
123-
const selectedComponent = ref(components.value[1]);
123+
const selectedComponent = ref(components.value[0]);
124124
125125
/**
126126
* Legacy testing arena where some non chart components can be tested

0 commit comments

Comments
 (0)