Skip to content

Commit 30b01e2

Browse files
committed
Prettier run on presets.js
1 parent f1c6fd2 commit 30b01e2

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

src/apps/weblib/js-api/presets.js

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default class Presets {
127127
y: "y",
128128
color: "color",
129129
size: "size",
130-
noop: "dividedBy"
130+
noop: "dividedBy",
131131
},
132132
geometry: "circle",
133133
},
@@ -222,7 +222,7 @@ export default class Presets {
222222
channels: {
223223
x: ["angle", "by"],
224224
color: "by",
225-
label: "angle"
225+
label: "angle",
226226
},
227227
coordSystem: "polar",
228228
},
@@ -252,30 +252,30 @@ export default class Presets {
252252
radialBar: {
253253
channels: {
254254
x: "angle",
255-
y: { set: "radius", range: { min: '-50%' } },
255+
y: { set: "radius", range: { min: "-50%" } },
256256
},
257257
coordSystem: "polar",
258258
},
259259
radialStackedBar: {
260260
channels: {
261261
x: ["angle", "stackedBy"],
262-
y: { set: "radius", range: { min: '-50%' } },
262+
y: { set: "radius", range: { min: "-50%" } },
263263
color: "stackedBy",
264264
},
265265
coordSystem: "polar",
266266
},
267267
donut: {
268268
channels: {
269269
x: ["angle", "stackedBy"],
270-
y: { range: {min:'-200%', max:'100%'} },
270+
y: { range: { min: "-200%", max: "100%" } },
271271
color: "stackedBy",
272272
},
273273
coordSystem: "polar",
274274
},
275275
nestedDonut: {
276276
channels: {
277277
x: ["angle", "stackedBy"],
278-
y: { set: "radius", range: { min: '-50%' } },
278+
y: { set: "radius", range: { min: "-50%" } },
279279
color: "stackedBy",
280280
label: "angle",
281281
},
@@ -312,7 +312,7 @@ export default class Presets {
312312
size: ["size", "dividedBy"],
313313
color: "color",
314314
label: "dividedBy",
315-
lightness: "size"
315+
lightness: "size",
316316
},
317317
},
318318
heatmap: {
@@ -349,9 +349,12 @@ export default class Presets {
349349

350350
_initPresetConfigChannels(channels) {
351351
for (let channel in channels) {
352-
if (typeof channels[channel] !== 'object' || Array.isArray(channels[channel])) {
352+
if (
353+
typeof channels[channel] !== "object" ||
354+
Array.isArray(channels[channel])
355+
) {
353356
channels[channel] = {
354-
set: channels[channel]
357+
set: channels[channel],
355358
};
356359
}
357360
}
@@ -400,16 +403,21 @@ export default class Presets {
400403
if (channels[channel] === null) {
401404
continue;
402405
} else if (typeof channels[channel].set === "string") {
403-
channels[channel].set = this._getChannelCopy(config[channels[channel].set]);
406+
channels[channel].set = this._getChannelCopy(
407+
config[channels[channel].set]
408+
);
404409
} else if (Array.isArray(channels[channel].set)) {
405410
let newChannel = [];
406411
for (let i = 0; i < channels[channel].set.length; i++) {
407-
let channelConfig = this._getChannelCopy(config[channels[channel].set[i]]);
412+
let channelConfig = this._getChannelCopy(
413+
config[channels[channel].set[i]]
414+
);
408415
if (channelConfig !== null) {
409416
newChannel.push(channelConfig);
410417
}
411418
}
412-
channels[channel].set = newChannel.length > 0 ? newChannel.flat() : null;
419+
channels[channel].set =
420+
newChannel.length > 0 ? newChannel.flat() : null;
413421
}
414422
}
415423
}

0 commit comments

Comments
 (0)