Skip to content

Commit a8fec7b

Browse files
committed
Dev environment - Update testing arena
1 parent dc20bd7 commit a8fec7b

File tree

6 files changed

+281
-255
lines changed

6 files changed

+281
-255
lines changed

TestingArena/ArenaVueUiQuadrant.vue

Lines changed: 65 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -8,79 +8,75 @@ import { useArena } from "../src/useArena";
88
99
const { local, build, vduiLocal, vduiBuild, toggleTable, toggleLabels } = useArena()
1010
11+
function makeDs(n,m) {
12+
const arr = [];
13+
for(let i = 0; i < n; i += 1) {
14+
arr.push({
15+
name: 'Serie',
16+
x: Math.random() > 0.5 ? Math.random()*m : -Math.random()*m,
17+
y: Math.random() > 0.5 ? Math.random()*m : -Math.random()*m,
18+
})
19+
}
20+
return arr
21+
}
22+
1123
const dataset = ref([
12-
{
13-
name: 'Serie 1',
14-
shape: 'star',
15-
series: [
16-
{
17-
name: "Star 1",
18-
x: 50,
19-
y: 50
20-
},
21-
{
22-
name: "Star 2",
23-
x: -10,
24-
y: -10
25-
},
26-
{
27-
name: "Star 3",
28-
x: -15,
29-
y: 20
30-
},
31-
{
32-
name: "Star 4",
33-
x: 15,
34-
y: -20
35-
},
36-
]
37-
},
38-
{
39-
name: 'Serie 2',
40-
shape: 'diamond',
41-
series: [
42-
{
43-
name: "Triangle 1",
44-
x: -50,
45-
y: -50
46-
},
47-
{
48-
name: "Triangle 2",
49-
x: 25,
50-
y: -25
51-
},
52-
{
53-
name: "Triangle 3",
54-
x: -25,
55-
y: 25
56-
},
57-
{
58-
name: "Triangle 4",
59-
x: 10,
60-
y: 10
61-
}
62-
]
63-
},
24+
// {
25+
// name: 'Serie 1',
26+
// shape: 'star',
27+
// series: [
28+
// {
29+
// name: "Star 1",
30+
// x: 50,
31+
// y: 50
32+
// },
33+
// {
34+
// name: "Star 2",
35+
// x: -10,
36+
// y: -10
37+
// },
38+
// {
39+
// name: "Star 3",
40+
// x: -15,
41+
// y: 20
42+
// },
43+
// {
44+
// name: "Star 4",
45+
// x: 15,
46+
// y: -20
47+
// },
48+
// ]
49+
// },
50+
// {
51+
// name: 'Serie 2',
52+
// shape: 'diamond',
53+
// series: [
54+
// {
55+
// name: "Triangle 1",
56+
// x: -50,
57+
// y: -50
58+
// },
59+
// {
60+
// name: "Triangle 2",
61+
// x: 25,
62+
// y: -25
63+
// },
64+
// {
65+
// name: "Triangle 3",
66+
// x: -25,
67+
// y: 25
68+
// },
69+
// {
70+
// name: "Triangle 4",
71+
// x: 10,
72+
// y: 10
73+
// }
74+
// ]
75+
// },
6476
{
6577
name: 'Serie 3',
6678
shape: 'hexagon',
67-
series: [
68-
{
69-
name: "Hexagon 1",
70-
x: -39,
71-
y: 39
72-
},
73-
{
74-
name: "Hexagon 2",
75-
x: -2,
76-
y: 45
77-
},
78-
{
79-
name: "Hexagon 3",
80-
x: -15,
81-
y: 30
82-
},
83-
]
79+
series: makeDs(1000, 100)
8480
}
8581
]);
8682

TestingArena/ArenaVueUiScatter.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const { local, build, vduiLocal, vduiBuild, toggleTable } = useArena()
1010
1111
const scat1 = computed(() => {
1212
const arr = [];
13-
for (let i = -100; i < 100; i += 1) {
13+
for (let i = -10000; i < 10000; i += 1) {
1414
arr.push({
1515
x: Math.random() * (Math.random() > 0.3 ? i / 3 : -i / 5),
1616
y: Math.random() * i / 20,
@@ -22,11 +22,11 @@ const scat1 = computed(() => {
2222
2323
const scat2 = computed(() => {
2424
const arr = [];
25-
for (let i = -100; i < 100; i += 1) {
25+
for (let i = -10000; i < 10000; i += 1) {
2626
arr.push({
2727
x: Math.random() * (Math.random() > 0.1 ? i / 10 : -i / 10),
2828
y: Math.random() * i / 10,
29-
name: `plot_${i}_cluster_2`
29+
name: `plot_${i}_cluster_2`,
3030
});
3131
}
3232
return arr;
@@ -43,7 +43,8 @@ const dataset = computed(() => {
4343
{
4444
name: "Cluster 2",
4545
values: scat2.value,
46-
shape: "triangle"
46+
shape: "triangle",
47+
color: 'orange'
4748
}
4849
]
4950
});

TestingArena/ArenaVueUiSparkTrend.vue

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@ import LocalVueDataUi from '../src/components/vue-data-ui.vue';
55
import Box from "./Box.vue";
66
import convertArrayToObject from "./convertModel";
77
8+
function makeDs(n,m) {
9+
const arr = [];
10+
for(let i = 0; i < n; i += 1) {
11+
arr.push(Math.random()*m)
12+
}
13+
return arr
14+
}
15+
16+
817
const datasets = ref({
9-
neutral: [10.33, 10.33, 10.33, 10.33, 10.33, 10.33, 10.33, 10.33],
10-
positive: [0, 1, 2, 3, 5, 0, 13, 21, 34, 55, 89, 144, 233.33],
11-
negative: [100, 95, 80, 60, 40, 20, 10, 9, 8, 7, 6, 5, 3, 1.33]
18+
neutral: makeDs(100000, 100),
19+
positive: makeDs(100000, 100),
20+
negative: makeDs(100000, 100),
1221
})
1322
1423
const alternateDataset = ref({
@@ -55,7 +64,7 @@ const model = ref([
5564
{ key: 'style.dataLabel.prefix', def: 'P', type: 'text'},
5665
{ key: 'style.dataLabel.suffix', def: 'S', type: 'text'},
5766
{ key: 'style.dataLabel.rounding', def: 1, type: 'number', min: 0, max: 12},
58-
{ key: 'style.trendLabel.trendType', def: 'n-1', type: 'select', options: ['n-1', 'global', 'lastToFirst']},
67+
{ key: 'style.trendLabel.trendType', def: 'global', type: 'select', options: ['n-1', 'global', 'lastToFirst']},
5968
{ key: 'style.trendLabel.useColorTrend', def: true, type: 'checkbox'},
6069
{ key: 'style.trendLabel.color', def: '#1A1A1A', type: 'color'},
6170
{ key: 'style.trendLabel.fontSize', def: 14, type: 'number', min: 8, max: 24},

TestingArena/ArenaVueUiSparkline.vue

Lines changed: 82 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -5,76 +5,88 @@ import LocalVueDataUi from '../src/components/vue-data-ui.vue';
55
import Box from "./Box.vue";
66
import convertArrayToObject from "./convertModel";
77
8-
const dataset = ref([
9-
{
10-
period: "period 1",
11-
value: 0
12-
},
13-
{
14-
period: "period 2",
15-
value: -1
16-
},
17-
{
18-
period: "period 3",
19-
value: 2
20-
},
21-
{
22-
period: "period 4",
23-
value: -3
24-
},
25-
{
26-
period: "period 5",
27-
value: 4
28-
},
29-
{
30-
period: "period 6",
31-
value: -5
32-
},
33-
{
34-
period: "period 7",
35-
value: 6
36-
},
37-
{
38-
period: "period 8",
39-
value: -7
40-
},
41-
{
42-
period: "period 9",
43-
value: 8
44-
},
45-
{
46-
period: "period 10",
47-
value: -9
48-
},
49-
{
50-
period: "period 11",
51-
value: 10
52-
},
53-
{
54-
period: "period 12",
55-
value: -11
56-
},
57-
{
58-
period: "period 13",
59-
value: 12
60-
},
61-
{
62-
period: "period 14",
63-
value: -13
64-
},
65-
{
66-
period: "period 15",
67-
value: 14
68-
},
69-
{
70-
period: "period 16",
71-
value: -15
72-
},
73-
{
74-
period: "period 17",
75-
value: 16
76-
},
77-
])
8+
// const dataset = ref([
9+
// {
10+
// period: "period 1",
11+
// value: 0
12+
// },
13+
// {
14+
// period: "period 2",
15+
// value: -1
16+
// },
17+
// {
18+
// period: "period 3",
19+
// value: 2
20+
// },
21+
// {
22+
// period: "period 4",
23+
// value: -3
24+
// },
25+
// {
26+
// period: "period 5",
27+
// value: 4
28+
// },
29+
// {
30+
// period: "period 6",
31+
// value: -5
32+
// },
33+
// {
34+
// period: "period 7",
35+
// value: 6
36+
// },
37+
// {
38+
// period: "period 8",
39+
// value: -7
40+
// },
41+
// {
42+
// period: "period 9",
43+
// value: 8
44+
// },
45+
// {
46+
// period: "period 10",
47+
// value: -9
48+
// },
49+
// {
50+
// period: "period 11",
51+
// value: 10
52+
// },
53+
// {
54+
// period: "period 12",
55+
// value: -11
56+
// },
57+
// {
58+
// period: "period 13",
59+
// value: 12
60+
// },
61+
// {
62+
// period: "period 14",
63+
// value: -13
64+
// },
65+
// {
66+
// period: "period 15",
67+
// value: 14
68+
// },
69+
// {
70+
// period: "period 16",
71+
// value: -15
72+
// },
73+
// {
74+
// period: "period 17",
75+
// value: 16
76+
// },
77+
// ])
78+
79+
const dataset = computed(() => {
80+
const arr = [];
81+
82+
for (let i = 0; i < 10000; i += 1) {
83+
arr.push({
84+
period: `Period ${i}`,
85+
value: Math.random() * 100
86+
})
87+
}
88+
return arr
89+
})
7890
7991
const alternateDataset = ref([
8092
{

0 commit comments

Comments
 (0)