Skip to content

Commit d80efbd

Browse files
committed
fix
1 parent d63497f commit d80efbd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/echarts/addons/Gk0Wk/Function/Function.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ const addon: IScriptAddon<void> = {
2222
[maxX, minX] = [minX, maxX];
2323
}
2424
// eslint-disable-next-line @typescript-eslint/no-implied-eval, no-new-func
25-
const func = new Function(
25+
const func_ = new Function(
2626
'x',
2727
`return ${addonAttributes.func};` || 'return x;',
2828
);
29+
const func = (x: number) => Math.max(-9e8, Math.min(9e8, func_(x)));
2930

3031
// 采样
3132
const points = [];

src/echarts/plugin.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.2.11",
2+
"version": "0.2.12",
33
"type": "application/json",
44
"title": "$:/plugins/Gk0Wk/echarts",
55
"plugin-type": "plugin",

0 commit comments

Comments
 (0)