592592 </svg >
593593
594594 <!-- SLICER -->
595- <div v-if =" chartConfig.chart.zoom.show" class =" vue-ui-xy-range-slider-wrapper" data-html2canvas-ignore >
595+ <div v-if =" chartConfig.chart.zoom.show" class =" vue-ui-xy-range-slider-wrapper" data-html2canvas-ignore style = " position : relative " >
596596 <div class =" vue-ui-xy-range-slider-label-left" >
597597 {{ chartConfig.chart.grid.labels.xAxisLabels.values[slicer.start] }}
598598 </div >
605605 <div class =" vue-ui-xy-range-slider-label-right" >
606606 {{ chartConfig.chart.grid.labels.xAxisLabels.values[slicer.end-1] }}
607607 </div >
608+ <div v-if =" slicer.start > 0 || slicer.end < maxX" style =" position :absolute ;right :0 " >
609+ <button tabindex =" 0" role =" button" class =" vue-ui-xy-refresh-button" @click =" refreshSlicer" >
610+ <BaseIcon name =" refresh" :stroke =" chartConfig.chart.color" />
611+ </button >
612+ </div >
608613 </div >
609614
610615 <!-- LEGEND AS OUTSIDE DIV -->
@@ -693,6 +698,7 @@ import Title from '../atoms/Title.vue';
693698import Tooltip from " ../atoms/Tooltip.vue" ;
694699import UserOptions from " ../atoms/UserOptions.vue" ;
695700import Shape from " ../atoms/Shape.vue" ;
701+ import BaseIcon from ' ../atoms/BaseIcon.vue' ;
696702
697703const uid = createUid ();
698704
@@ -713,12 +719,13 @@ export default {
713719 }
714720 },
715721 components: {
716- DataTable,
717- Shape,
718- Title,
719- Tooltip,
720- UserOptions,
721- },
722+ DataTable,
723+ Shape,
724+ Title,
725+ Tooltip,
726+ UserOptions,
727+ BaseIcon
728+ },
722729 data (){
723730 const uniqueId = uid;
724731 const maxX = Math .max (... this .dataset .map (datapoint => datapoint .series .length ));
@@ -1233,6 +1240,14 @@ export default {
12331240 createStar,
12341241 createPolygonPath,
12351242 // ///////////////////////////// CANVAS /////////////////////////////////
1243+ refreshSlicer () {
1244+ this .slicer = {
1245+ start: 0 ,
1246+ end: Math .max (... this .dataset .map (datapoint => datapoint .series .length ))
1247+ }
1248+ const sliderTrack = document .getElementById (` vue-ui-slider-track_${ this .uniqueId } ` );
1249+ sliderTrack .style .background = ` linear-gradient(to right, #dadae5 0% , #858585 100% , #858585 0%, #dadae5 100%)` ;
1250+ },
12361251 createCanvasArea (plots ) {
12371252 const start = { x: plots[0 ].x , y: this .zero };
12381253 const end = { x: plots .at (- 1 ).x , y: this .zero };
@@ -1918,7 +1933,7 @@ export default {
19181933}
19191934< / script>
19201935
1921- < style scoped>
1936+ < style scoped lang = " scss " >
19221937.vue - ui- xy * {
19231938 transition: unset;
19241939}
@@ -1989,6 +2004,7 @@ path, line, rect {
19892004
19902005.vue - ui- xy- range- slider- wrapper {
19912006 width: 100 % ;
2007+ margin: 0 auto;
19922008 display: flex;
19932009 flex- direction: row;
19942010 gap: 6px ;
@@ -1997,11 +2013,12 @@ path, line, rect {
19972013.vue - ui- xy- range- slider {
19982014 position: relative;
19992015 width: 100 % ;
2016+ margin: 0 auto;
20002017 height: 12px ;
20012018}
20022019.vue - ui- xy- range- slider- label- right,
20032020.vue - ui- xy- range- slider- label- left {
2004- width: 100px ;
2021+ width: 100 % ;
20052022}
20062023
20072024.vue - ui- xy- range- slider- label- right {
@@ -2098,4 +2115,20 @@ canvas {
20982115.vue - data- ui- wrapper- fullscreen {
20992116 overflow: scroll;
21002117}
2118+
2119+ .vue - ui- xy- refresh- button {
2120+ outline: none;
2121+ border: none;
2122+ background: transparent;
2123+ height: 36px ;
2124+ width: 36px ;
2125+ display: flex;
2126+ align- items: center;
2127+ justify- content: center;
2128+ border- radius: 50 % ;
2129+ cursor: pointer;
2130+ & : focus {
2131+ outline: 1px solid #CCCCCC
2132+ }
2133+ }
21012134< / style>
0 commit comments