Skip to content

Commit 7432262

Browse files
committed
Improvement - Slicer - Improved styling
1 parent f5339b9 commit 7432262

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

src/atoms/Slicer.vue

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ const props = defineProps({
77
type: String,
88
default: '#FFFFFF'
99
},
10+
borderColor: {
11+
type: String,
12+
default: '#FFFFFF'
13+
},
1014
fontSize: {
1115
type: Number,
1216
default: 14
@@ -71,7 +75,8 @@ const highlightStyle = computed(() => {
7175
7276
const slicerColor = computed(() => props.inputColor);
7377
const backgroundColor = computed(() => props.background);
74-
const selectColorOpaque = computed(() => `${props.selectColor}33`)
78+
const selectColorOpaque = computed(() => `${props.selectColor}33`);
79+
const borderColor = computed(() => props.borderColor);
7580
7681
function reset() {
7782
emit('reset');
@@ -173,7 +178,7 @@ input[type="range"]::-webkit-slider-thumb {
173178
cursor: pointer;
174179
position: relative;
175180
z-index: 2;
176-
outline: 2px solid v-bind(backgroundColor);
181+
outline: 2px solid v-bind(borderColor);
177182
transition: all 0.2s ease-in-out;
178183
&:active,
179184
&:hover {
@@ -191,7 +196,7 @@ input[type="range"]::-moz-range-thumb {
191196
cursor: pointer;
192197
position: relative;
193198
z-index: 2;
194-
outline: 2px solid v-bind(backgroundColor);
199+
outline: 2px solid v-bind(borderColor);
195200
transition: all 0.2s ease-in-out;
196201
&:active,
197202
&:hover {
@@ -209,7 +214,7 @@ input[type="range"]::-ms-thumb {
209214
cursor: pointer;
210215
position: relative;
211216
z-index: 2;
212-
outline: 2px solid v-bind(backgroundColor);
217+
outline: 2px solid v-bind(borderColor);
213218
transition: all 0.2s ease-in-out;
214219
&:active,
215220
&:hover {
@@ -223,7 +228,7 @@ input[type="range"]::-ms-thumb {
223228
width: 99%;
224229
height: 8px;
225230
border-radius: 4px;
226-
background: #ddd;
231+
background: v-bind(backgroundColor);
227232
top: 8px;
228233
z-index: 1;
229234
left: 50%;

src/components/vue-ui-candlestick.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,8 @@ defineExpose({
681681

682682
<Slicer v-if="candlestickConfig.style.zoom.show && isDataset"
683683
:key="`slicer_${slicerStep}`"
684-
:background="candlestickConfig.style.backgroundColor"
684+
:background="candlestickConfig.style.zoom.color"
685+
:borderColor="candlestickConfig.style.backgroundColor"
685686
:fontSize="candlestickConfig.style.zoom.fontSize"
686687
:useResetSlot="candlestickConfig.style.zoom.useResetSlot"
687688
:labelLeft="dataset[slicer.start] ? dataset[slicer.start][0] : dataset[0][0]"

src/components/vue-ui-donut-evolution.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,8 @@ defineExpose({
867867
<Slicer
868868
v-if="maxLength > 1 && donutEvolutionConfig.style.chart.zoom.show"
869869
:key="`slicer_${slicerStep}`"
870-
:background="donutEvolutionConfig.style.chart.backgroundColor"
870+
:background="donutEvolutionConfig.style.chart.zoom.color"
871+
:borderColor="donutEvolutionConfig.style.chart.backgroundColor"
871872
:fontSize="donutEvolutionConfig.style.chart.zoom.fontSize"
872873
:useResetSlot="donutEvolutionConfig.style.chart.zoom.useResetSlot"
873874
:labelLeft="donutEvolutionConfig.style.chart.layout.grid.xAxis.dataLabels.values[Number(slicer.start)] || ''"

src/components/vue-ui-quick-chart.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,8 @@ defineExpose({
12811281
<Slicer
12821282
v-if="[detector.chartType.BAR, detector.chartType.LINE].includes(chartType) && quickConfig.zoomXy && formattedDataset.maxSeriesLength > 1"
12831283
:key="`slicer_${slicerStep}`"
1284-
:background="quickConfig.backgroundColor"
1284+
:background="quickConfig.zoomColor"
1285+
:borderColor="quickConfig.backgroundColor"
12851286
:fontSize="quickConfig.zoomFontSize"
12861287
:useResetSlot="quickConfig.zoomUseResetSlot"
12871288
:labelLeft="quickConfig.xyPeriods[slicer.start] ? quickConfig.xyPeriods[slicer.start] : ''"

src/components/vue-ui-xy.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,14 +832,15 @@
832832
<Slicer
833833
v-if="chartConfig.chart.zoom.show && maxX > 6 && isDataset"
834834
:key="`slicer_${slicerStep}`"
835-
:background="chartConfig.chart.backgroundColor"
835+
:background="chartConfig.chart.zoom.color"
836836
:fontSize="chartConfig.chart.zoom.fontSize"
837837
:useResetSlot="chartConfig.chart.zoom.useResetSlot"
838838
:labelLeft="chartConfig.chart.grid.labels.xAxisLabels.values[slicer.start]"
839839
:labelRight="chartConfig.chart.grid.labels.xAxisLabels.values[slicer.end-1]"
840840
:textColor="chartConfig.chart.color"
841841
:inputColor="chartConfig.chart.zoom.color"
842842
:selectColor="chartConfig.chart.zoom.highlightColor"
843+
:borderColor="chartConfig.chart.backgroundColor"
843844
:max="maxX"
844845
:min="0"
845846
:valueStart="slicer.start"

0 commit comments

Comments
 (0)