Skip to content

Commit dbdf9fb

Browse files
committed
Config - Add downsample config attribute
1 parent a8fec7b commit dbdf9fb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/useConfig.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ export function useConfig() {
6868
DESC: 'desc'
6969
}
7070

71+
const LTTB = {
72+
threshold: 500,
73+
}
74+
7175
const TITLE = {
7276
text: "",
7377
color: COLOR_BLACK,
@@ -354,6 +358,7 @@ export function useConfig() {
354358
responsive: false,
355359
customPalette: [],
356360
useCssAnimation: true,
361+
downsample: LTTB,
357362
chart: {
358363
fontFamily: 'inherit',
359364
backgroundColor: COLOR_WHITE,
@@ -964,6 +969,7 @@ export function useConfig() {
964969
customPalette: [],
965970
useCssAnimation: true,
966971
zoomAnimationFrames: 20,
972+
downsample: LTTB,
967973
style: {
968974
fontFamily: 'inherit',
969975
chart: {
@@ -1723,6 +1729,7 @@ export function useConfig() {
17231729
theme: '',
17241730
customPalette: [],
17251731
useCssAnimation: true,
1732+
downsample: LTTB,
17261733
style: {
17271734
fontFamily: 'inherit',
17281735
backgroundColor: COLOR_WHITE,
@@ -1983,6 +1990,7 @@ export function useConfig() {
19831990
theme: '',
19841991
responsive: false,
19851992
type: SHAPE.LINE,
1993+
downsample: LTTB,
19861994
style: {
19871995
chartWidth: 290,
19881996
animation: {
@@ -2281,6 +2289,7 @@ export function useConfig() {
22812289

22822290
const vue_ui_spark_trend = {
22832291
theme: '',
2292+
downsample: LTTB,
22842293
style: {
22852294
fontFamily: 'inherit',
22862295
backgroundColor: COLOR_WHITE,
@@ -3541,6 +3550,9 @@ export function useConfig() {
35413550
responsive: false,
35423551
theme: '',
35433552
customPalette: [],
3553+
downsample: {
3554+
threshold: 10000
3555+
},
35443556
userOptions: USER_OPTIONS({
35453557
tooltip: true,
35463558
pdf: true,

0 commit comments

Comments
 (0)