UNPKG

@visactor/vchart

Version:

charts lib based @visactor/VGrammar

158 lines (156 loc) 4.36 kB
const DataZoomHandlerSymbolType = "M-0.5-2.4h0.9c0.4,0,0.7,0.3,0.7,0.7v3.3c0,0.4-0.3,0.7-0.7,0.7h-0.9c-0.4,0-0.7-0.3-0.7-0.7v-3.3\nC-1.2-2-0.9-2.4-0.5-2.4z M-0.4-1.4L-0.4-1.4c0,0,0,0.1,0,0.1v2.6c0,0.1,0,0.1,0,0.1l0,0c0,0,0-0.1,0-0.1v-2.6\nC-0.4-1.4-0.4-1.4-0.4-1.4z M0.3-1.4L0.3-1.4c0,0,0,0.1,0,0.1v2.6c0,0.1,0,0.1,0,0.1l0,0c0,0,0-0.1,0-0.1v-2.6\nC0.3-1.4,0.3-1.4,0.3-1.4z;", getHandlerTheme = () => ({ style: { symbolType: DataZoomHandlerSymbolType, fill: { type: "palette", key: "sliderHandleColor" }, scaleX: 1.2, scaleY: 1.2, stroke: { type: "palette", key: "dataZoomHandleStrokeColor" }, lineWidth: 1 } }), getTextTheme = () => ({ padding: 8, style: { fontSize: { type: "token", key: "l5FontSize" }, lineHeight: { type: "token", key: "l5LineHeight" }, fill: { type: "palette", key: "secondaryFontColor", default: "#89909d" } } }), getBackgroundChartTheme = visible => ({ area: { style: { visible: visible, stroke: !1, fill: { type: "palette", key: "dataZoomChartColor" } } }, line: { style: { visible: visible, stroke: { type: "palette", key: "dataZoomChartColor" }, lineWidth: 1 } } }); export const dataZoom = { padding: [ 12, 0 ], showDetail: "auto", brushSelect: !1, middleHandler: { visible: !1, background: { size: 6, style: { stroke: { type: "palette", key: "dataZoomHandleStrokeColor" }, cornerRadius: 2 } }, icon: { style: { size: 4, fill: { type: "palette", key: "sliderHandleColor" }, stroke: { type: "palette", key: "dataZoomHandleStrokeColor" }, symbolType: "M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z", lineWidth: .5 } } }, background: { size: 20, style: { fill: { type: "palette", key: "sliderRailColor" }, lineWidth: 0 } }, selectedBackground: { style: { fill: { type: "palette", key: "sliderTrackColor" }, fillOpacity: .1, outerBorder: { stroke: { type: "palette", key: "sliderTrackColor" }, strokeOpacity: .2, distance: -.5, lineWidth: 1 } } }, selectedBackgroundChart: getBackgroundChartTheme(!1), startHandler: getHandlerTheme(), endHandler: getHandlerTheme(), startText: { padding: 8, style: { fontSize: { type: "token", key: "l5FontSize" }, lineHeight: { type: "token", key: "l5LineHeight" }, fill: { type: "palette", key: "secondaryFontColor", default: "#89909d" } } }, endText: { padding: 8, style: { fontSize: { type: "token", key: "l5FontSize" }, lineHeight: { type: "token", key: "l5LineHeight" }, fill: { type: "palette", key: "secondaryFontColor", default: "#89909d" } } }, backgroundChart: getBackgroundChartTheme(!0) }; //# sourceMappingURL=data-zoom.js.map