Skip to content

Commit b156985

Browse files
authored
Merge pull request #149 from graphieros/ft-userOptions-state
Ft user options state
2 parents b8fd284 + f719317 commit b156985

File tree

83 files changed

+473
-81
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+473
-81
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,18 @@ const config = ref({
508508
})
509509
```
510510

511+
User options menu can be set to appear only when hovering the component:
512+
513+
```js
514+
const config = ref({
515+
userOptions: {
516+
show: true,
517+
showOnChartHover: true, // Default: false
518+
keepStateOnChartLeave: true, // Set to false to always close the menu when hovering out of the chart
519+
},
520+
});
521+
```
522+
511523
Predefined actions in user options menu depend on the type of chart. Some charts have more or less actions available. Action buttons contain an predefined icons by default.
512524

513525
To hide a given action, set the userOption.buttons, for example:

TestingArena/ArenaVueUi3dBar.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ const model = ref([
8888
{ key: 'userOptions.buttons.table', def: true, type: 'checkbox'},
8989
{ key: 'userOptions.buttons.fullscreen', def: true, type: 'checkbox'},
9090
{ key: 'userOptions.position', def: 'right', type: 'select', options: ['left', 'right']},
91+
{ key: 'userOptions.showOnChartHover', def: true, type: 'checkbox'},
92+
{ key: 'userOptions.keepStateOnChartLeave', def: true, type: 'checkbox'},
9193
9294
{ key: 'style.fontFamily', def: 'inherit', type: 'text'},
9395
{ key: 'style.shape', def: 'bar', type: 'select', options: ['bar', 'tube']},

TestingArena/ArenaVueUiAgePyramid.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ const model = ref([
5252
{ key: 'userOptions.buttons.table', def: true, type: 'checkbox' },
5353
{ key: 'userOptions.buttons.fullscreen', def: true, type: 'checkbox' },
5454
{ key: 'userOptions.position', def: 'right', type: 'select', options: ['left', 'right']},
55+
{ key: 'userOptions.showOnChartHover', def: true, type: 'checkbox'},
56+
{ key: 'userOptions.keepStateOnChartLeave', def: true, type: 'checkbox'},
5557
5658
{ key: 'style.backgroundColor', def: '#FFFFFF20', type: 'color'},
5759
{ key: 'style.color', def: '#1A1A1A', type: 'color'},

TestingArena/ArenaVueUiBullet.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ const model = ref([
4545
{ key: 'userOptions.buttonTitles.pdf', def: 'PDF', type: 'text'},
4646
{ key: 'userOptions.buttonTitles.img', def: 'IMG', type: 'text'},
4747
{ key: 'userOptions.buttonTitles.fullscreen', def: 'FSC', type: 'text'},
48+
{ key: 'userOptions.showOnChartHover', def: true, type: 'checkbox'},
49+
{ key: 'userOptions.keepStateOnChartLeave', def: true, type: 'checkbox'},
4850
4951
{ key: 'style.chart.backgroundColor', def: '#FFFFFF', type: 'color' },
5052
{ key: 'style.chart.color', def: '#1A1A1A', type: 'color'},

TestingArena/ArenaVueUiCandlestick.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ const model = ref([
6767
{ key: 'userOptions.buttons.table', def: true, type: 'checkbox'},
6868
{ key: 'userOptions.buttons.fullscreen', def: true, type: 'checkbox'},
6969
{ key: 'userOptions.position', def: 'right', type: 'select', options: ['left', 'right']},
70+
{ key: 'userOptions.showOnChartHover', def: true, type: 'checkbox'},
71+
{ key: 'userOptions.keepStateOnChartLeave', def: true, type: 'checkbox'},
7072
7173
{ key: 'useCssAnimation', def: true, type: 'checkbox'},
7274
{ key: 'style.fontFamily', def: "inherit", type: 'text'},

TestingArena/ArenaVueUiCarouselTable.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ const model = ref([
8080
{ key: 'userOptions.buttons.animation', def: true, type: 'checkbox' },
8181
{ key: 'userOptions.buttons.fullscreen', def: true, type: 'checkbox' },
8282
{ key: 'userOptions.position', def: 'right', type: 'select', options: ['left', 'right']},
83+
{ key: 'userOptions.showOnChartHover', def: true, type: 'checkbox'},
84+
{ key: 'userOptions.keepStateOnChartLeave', def: true, type: 'checkbox'},
8385
8486
{ key: 'userOptions.buttonTitles.pdf', def: 'DOWNLOAD PDF', type: 'text'},
8587
{ key: 'userOptions.buttonTitles.csv', def: 'DOWNLOAD CSV', type: 'text'},

TestingArena/ArenaVueUiChestnut.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ const model = ref([
283283
{ key: 'userOptions.buttons.table', def: true, type: 'checkbox' },
284284
{ key: 'userOptions.buttons.fullscreen', def: true, type: 'checkbox' },
285285
{ key: 'userOptions.position', def: 'right', type: 'select', options: ['left', 'right']},
286+
{ key: 'userOptions.showOnChartHover', def: true, type: 'checkbox'},
287+
{ key: 'userOptions.keepStateOnChartLeave', def: true, type: 'checkbox'},
286288
287289
{ key: 'style.fontFamily', def: 'inherit', type: 'text'},
288290
{ key: 'style.chart.backgroundColor', def: '#FFFFFF20', type: 'color'},

TestingArena/ArenaVueUiDonut.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ const model = ref([
7676
{ key: 'userOptions.buttons.fullscreen', def: true, type: 'checkbox' },
7777
{ key: 'userOptions.buttons.annotator', def: true, type: 'checkbox' },
7878
{ key: 'userOptions.position', def: 'right', type: 'select', options: ['left', 'right']},
79+
{ key: 'userOptions.showOnChartHover', def: true, type: 'checkbox'},
80+
{ key: 'userOptions.keepStateOnChartLeave', def: true, type: 'checkbox'},
7981
8082
{ key: 'useCssAnimation', def: true, type: 'checkbox', label: 'useCssAnimation', category: 'general' },
8183
{ key: 'useBlurOnHover', def: true, type: 'checkbox', label: "useBlurOnHover", category: 'general' },

TestingArena/ArenaVueUiDonutEvolution.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ const model = ref([
3535
{ key: 'userOptions.buttons.table', def: true, type: 'checkbox'},
3636
{ key: 'userOptions.buttons.fullscreen', def: true, type: 'checkbox'},
3737
{ key: 'userOptions.position', def: 'right', type: 'select', options: ['left', 'right']},
38+
{ key: 'userOptions.showOnChartHover', def: true, type: 'checkbox'},
39+
{ key: 'userOptions.keepStateOnChartLeave', def: true, type: 'checkbox'},
3840
3941
{ key: 'style.fontFamily', def: 'inherit', type: 'text'},
4042
{ key: 'style.chart.backgroundColor', def: '#FFFFFF20', type: 'color'},

TestingArena/ArenaVueUiDumbbell.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ const model = ref([
3636
{ key: 'userOptions.buttons.table', def: true, type: 'checkbox'},
3737
{ key: 'userOptions.buttons.fullscreen', def: true, type: 'checkbox'},
3838
{ key: 'userOptions.position', def: 'right', type: 'select', options: ['left', 'right']},
39+
{ key: 'userOptions.showOnChartHover', def: true, type: 'checkbox'},
40+
{ key: 'userOptions.keepStateOnChartLeave', def: true, type: 'checkbox'},
3941
4042
{ key: 'useAnimation', def: true, type: 'checkbox'},
4143
{ key: 'animationSpeed', def: 2, type: 'number', min: 1, max: 10},

0 commit comments

Comments
 (0)