Skip to content

Commit 5028c11

Browse files
committed
Improvement - VueUiXy - Improve layout setup & responsive mode
1 parent a112870 commit 5028c11

File tree

4 files changed

+1177
-1097
lines changed

4 files changed

+1177
-1097
lines changed

TestingArena/ArenaVueUiXy.vue

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,10 @@ const model = ref([
400400
{ key: 'chart.zoom.startIndex', def: null, type: 'number', min: 0, max: 100 },
401401
{ key: 'chart.zoom.endIndex', def: null, type: 'number', min: 0, max: 100 },
402402
403-
{ key: 'chart.padding.top', def: 36, type: 'number', min: 0, max: 100, label: "top", category: 'padding' },
404-
{ key: 'chart.padding.right', def: 36, type: 'number', min: 0, max: 100, label: 'right', category: 'padding' },
405-
{ key: 'chart.padding.bottom', def: 64, type: 'number', min: 0, max: 100, label: 'bottom', category: 'padding' },
406-
{ key: 'chart.padding.left', def: 48, type: 'number', min: 0, max: 100, label: 'left', category: 'padding' },
403+
{ key: 'chart.padding.top', def: 0, type: 'number', min: 0, max: 100, label: "top", category: 'padding' },
404+
{ key: 'chart.padding.right', def: 0, type: 'number', min: 0, max: 100, label: 'right', category: 'padding' },
405+
{ key: 'chart.padding.bottom', def: 0, type: 'number', min: 0, max: 100, label: 'bottom', category: 'padding' },
406+
{ key: 'chart.padding.left', def: 0, type: 'number', min: 0, max: 100, label: 'left', category: 'padding' },
407407
408408
{ key: 'chart.highlighter.color', def: '#1A1A1A', type: 'color', label: 'highlighterColor', category: 'general' },
409409
{ key: 'chart.highlighter.opacity', def: 5, type: 'range', min: 0, max: 100, label: 'highlighterOpacity', category: 'general' },
@@ -449,14 +449,14 @@ const model = ref([
449449
{ key: 'chart.grid.labels.xAxisLabels.showOnlyFirstAndLast', def: false, type: 'checkbox', label: 'showOnlyFirstAndLast', category: 'grid' },
450450
{ key: 'chart.grid.labels.xAxisLabels.yOffset', def: 24, type: 'number', min: -100, max: 100, label: 'offsetYPeriodLabels', category: 'grid' },
451451
{ key: 'chart.grid.labels.xAxisLabels.rotation', def: 0, type: 'range', min: -360, max: 360, label: 'rotation', category: 'grid' },
452-
{ key: 'chart.grid.labels.axis.xLabelOffsetY', def: 24, type: 'number', min: -100, max: 100 },
452+
{ key: 'chart.grid.labels.axis.xLabelOffsetY', def: 0, type: 'number', min: -100, max: 100 },
453453
454454
{ key: 'chart.grid.labels.xAxisLabels.showOnlyAtModulo', def: false, type: 'checkbox' },
455455
{ key: 'chart.grid.labels.xAxisLabels.modulo', def: 6, type: 'number' },
456456
457457
{ key: 'chart.grid.labels.yAxis.position', def: 'right', type: 'select', options: ['left', 'right'] },
458458
{ key: 'chart.grid.labels.yAxis.commonScaleSteps', def: 10, min: 0, max: 100, type: 'number' },
459-
{ key: 'chart.grid.labels.yAxis.useIndividualScale', def: false, type: "checkbox" },
459+
{ key: 'chart.grid.labels.yAxis.useIndividualScale', def: true, type: "checkbox" },
460460
{ key: 'chart.grid.labels.yAxis.stacked', def: false, type: 'checkbox' },
461461
{ key: 'chart.grid.labels.yAxis.gap', def: 24, min: 0, max: 200, type: 'number' },
462462
{ key: 'chart.grid.labels.yAxis.labelWidth', def: 48, min: 0, max: 100, type: 'number' },
@@ -466,7 +466,7 @@ const model = ref([
466466
{ key: 'chart.grid.labels.yAxis.groupColor', def: '#1A1A1A', type: 'color' },
467467
{ key: 'chart.grid.labels.yAxis.scaleLabelOffsetX', def: 36, type: 'number', min: -100, max: 100 },
468468
{ key: 'chart.grid.labels.yAxis.scaleValueOffsetX', def: -20, type: 'number', min: -100, max: 100 },
469-
{ key: 'chart.grid.labels.yAxis.useNiceScale', def: true, type: 'checkbox'},
469+
{ key: 'chart.grid.labels.yAxis.useNiceScale', def: false, type: 'checkbox'},
470470
471471
{ key: 'chart.grid.labels.yAxis.showCrosshairs', def: true, type: 'checkbox'},
472472
{ key: 'chart.grid.labels.xAxis.showCrosshairs', def: true, type: 'checkbox'},
@@ -831,12 +831,13 @@ const config = computed(() => {
831831
},
832832
xAxisLabels: {
833833
...c.chart.grid.labels.xAxisLabels,
834-
// values: monthValues.value,
835-
values: new Array(13).fill(0).map((d,i) => {
836-
return `Some long name\nwith a value ${i}`
837-
}),
834+
values: monthValues.value,
835+
// values: new Array(13).fill(0).map((d,i) => {
836+
// return `Some long name\nwith a value ${i}`
837+
// }),
838+
rotation: -30,
838839
datetimeFormatter: {
839-
enable: false,
840+
enable: true,
840841
locale: 'en',
841842
useUTC: false,
842843
januaryAsYear: true,

src/atoms/BaseDraggableDialog.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ const props = defineProps({
99
headerBg: { type: String },
1010
headerColor: { type: String },
1111
fullscreenParent: { type: HTMLElement },
12-
isFullscreen: { type: Boolean, default: false }
12+
isFullscreen: { type: Boolean, default: false },
13+
withPadding: { type: Boolean, default: false }
1314
});
1415
1516
const emit = defineEmits(["close"]);
@@ -219,7 +220,7 @@ onUnmounted(() => {
219220
<BaseIcon name="close" :stroke="headerColor"/>
220221
</button>
221222
</div>
222-
<div class="modal-body">
223+
<div :class="{ 'modal-body': !withPadding, 'modal-body-pad': withPadding}">
223224
<slot />
224225
</div>
225226
<div class="resize-handle" @mousedown.stop.prevent="initResize" @touchstart.stop.prevent="initResize" />
@@ -274,6 +275,13 @@ onUnmounted(() => {
274275
transition: all 0.2s ease-in-out;
275276
}
276277
278+
.modal-body-pad {
279+
padding: 0 12px;
280+
width: calc(100% - 24px);
281+
height: 80%;
282+
transition: all 0.2s ease-in-out;
283+
}
284+
277285
.resize-handle {
278286
width: 20px;
279287
height: 20px;

src/components/vue-ui-ridgeline.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,7 @@ defineExpose({
10651065
:headerColor="FINAL_CONFIG.style.chart.dialog.header.color"
10661066
:isFullscreen="isFullscreen"
10671067
:fullscreenParent="ridgelineChart"
1068+
withPadding
10681069
>
10691070
<template #title>
10701071
{{ selectedDatapoint.name }}

0 commit comments

Comments
 (0)