Skip to content

Commit 510b7d8

Browse files
committed
New feature - Add zoom minimap compact mode with detailed series (VueUiXy, VueUiQuickChart)
1 parent 4ed642c commit 510b7d8

File tree

10 files changed

+1421
-375
lines changed

10 files changed

+1421
-375
lines changed

TestingArena/ArenaVueUiQuickChart.vue

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,20 @@ const datasets = ref({
9595
values: [-3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14]
9696
}
9797
],
98+
longObjectMixed: [
99+
{
100+
name: 'Serie 1',
101+
values: [12, 7, 4, 11, 13, 16, 19, 22, 15, 28, 16, 12]
102+
},
103+
{
104+
name: 'Serie 2',
105+
values: [-2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13]
106+
},
107+
{
108+
name: 'Serie 3',
109+
values: [-3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14]
110+
}
111+
],
98112
donut: [
99113
{ name: 'Serie 1', value: 12},
100114
{ name: 'Serie 2', value: 12},
@@ -120,12 +134,12 @@ function alterDataset() {
120134
}
121135
122136
123-
const selectedSerie = ref('longArray');
137+
const selectedSerie = ref('shortObjectMixed');
124138
125139
const model = ref([
126140
{ key: 'debug', def: true, type: 'checkbox'},
127141
{ key: 'loading', def: false, type: 'checkbox'},
128-
{ key: 'backgroundColor', def: '#FFFFFF20', type: 'color'},
142+
{ key: 'backgroundColor', def: '#FFFFFF', type: 'color'},
129143
{ key: 'responsive', def: false, type: 'checkbox'},
130144
{ key: 'userOptionsButtons.pdf', def: true, type: 'checkbox'},
131145
{ key: 'userOptionsButtons.img', def: true, type: 'checkbox'},
@@ -229,7 +243,7 @@ const model = ref([
229243
{ key: 'zoomMinimap.lineColor', def: '#1A1A1A', type: 'color'},
230244
{ key: 'zoomMinimap.selectionRadius', def: 2, type: 'range', min: 0, max: 24},
231245
{ key: 'zoomMinimap.indicatorColor', def: '#1A1A1A', type: 'color'},
232-
{ key: 'zoomMinimap.verticalHandles', def: true, type: 'checkbox'},
246+
{ key: 'zoomMinimap.verticalHandles', def: false, type: 'checkbox'},
233247
234248
{ key: 'zoomStartIndex', def: null, type: 'number', min: 0, max: 100},
235249
{ key: 'zoomEndIndex', def: null, type: 'number', min: 0, max: 100},

TestingArena/ArenaVueUiXy.vue

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,11 @@ const dates = [
284284
function createDs(n, m = 100) {
285285
const arr = [];
286286
for (let i = 0; i < n; i += 1) {
287-
arr.push(Math.random() * m * 1)
287+
if (i > 20 && i < 30) {
288+
arr.push(null);
289+
} else {
290+
arr.push(Math.random() * m * (Math.random() > 0.3 ? 1 : -1))
291+
}
288292
}
289293
return arr
290294
}
@@ -390,7 +394,23 @@ onMounted(() => {
390394
dataset.value = [
391395
{
392396
name: "Serie A",
393-
series: createDs(100),
397+
series: createDs(12),
398+
type: "bar",
399+
dataLabels: false,
400+
smooth: true,
401+
useArea: true,
402+
},
403+
{
404+
name: "Serie A",
405+
series: createDs(12),
406+
type: "bar",
407+
dataLabels: false,
408+
smooth: true,
409+
useArea: true,
410+
},
411+
{
412+
name: "Serie B",
413+
series: createDs(12),
394414
type: "line",
395415
dataLabels: false,
396416
smooth: true,
@@ -413,7 +433,7 @@ onMounted(() => {
413433
// dataLabels: false,
414434
// },
415435
]
416-
}, 2000)
436+
}, 0)
417437
})
418438
419439
// const dataset = ref([
@@ -639,18 +659,20 @@ const model = ref([
639659
{ key: 'chart.zoom.enableRangeHandles', def: true, type: 'chexkbox' },
640660
{ key: 'chart.zoom.enableSelectionDrag', def: true, type: 'checkbox' },
641661
642-
{ key: 'chart.zoom.minimap.show', def: false, type: 'checkbox' },
662+
{ key: 'chart.zoom.minimap.show', def: true, type: 'checkbox' },
643663
{ key: 'chart.zoom.minimap.smooth', def: true, type: 'checkbox' },
644664
{ key: 'chart.zoom.minimap.selectedColor', def: '#1f77b4', type: 'color' },
645665
{ key: 'chart.zoom.minimap.selectedColorOpacity', def: 0.2, type: 'range', min: 0, max: 1, step: 0.01 },
646666
{ key: 'chart.zoom.minimap.lineColor', def: '#1A1A1A', type: 'color' },
647667
{ key: 'chart.zoom.minimap.selectionRadius', def: 2, type: 'number', min: 0, max: 24 },
648668
{ key: 'chart.zoom.minimap.indicatorColor', def: '#1A1A1A', type: 'color' },
649669
{ key: 'chart.zoom.minimap.verticalHandles', def: false, type: 'checkbox' },
670+
{ key: 'chart.zoom.minimap.compact', def: true, type: 'checkbox' },
671+
{ key: 'chart.zoom.minimap.merged', def: false, type: 'checkbox' },
650672
651-
{ key: 'chart.zoom.startIndex', def: null, type: 'number', min: 0, max: 100 },
652-
{ key: 'chart.zoom.endIndex', def: null, type: 'number', min: 0, max: 100 },
653-
{ key: 'chart.zoom.preview.enable', def: true, type: 'checkbox'},
673+
{ key: 'chart.zoom.startIndex', def: 5, type: 'number', min: 0, max: 100 },
674+
{ key: 'chart.zoom.endIndex', def: 8, type: 'number', min: 0, max: 100 },
675+
{ key: 'chart.zoom.preview.enable', def: false, type: 'checkbox'},
654676
{ key: 'chart.zoom.preview.stroke', def: '#1f77b4', type: 'color'},
655677
{ key: 'chart.zoom.preview.fill', def: '#1f77b420', type: 'color'},
656678
{ key: 'chart.zoom.preview.strokeDasharray', def: 0, type: 'number', min: 0, max: 12},
@@ -1156,9 +1178,9 @@ const config = computed(() => {
11561178
...c.chart.zoom,
11571179
useDefaultFormat: true,
11581180
timeFormat: 'yyyy-MM-dd HH:mm:ss',
1159-
customFormat: ({ absoluteIndex }) => {
1160-
return String(absoluteIndex) + 'TEST'
1161-
}
1181+
// customFormat: ({ absoluteIndex }) => {
1182+
// return String(absoluteIndex) + 'TEST'
1183+
// }
11621184
},
11631185
timeTag: {
11641186
...c.chart.timeTag,

0 commit comments

Comments
 (0)