Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovilia committed Feb 2, 2024
1 parent 8457b2f commit 5b902df
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions public/examples/ts/bar-stack-normalization-and-variation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const categoryWidth = gridWidth / rawData[0].length;
const barWidth = categoryWidth * 0.6;
const barPadding = (categoryWidth - barWidth) / 2;

const series = [
const series: echarts.BarSeriesOption[] = [
'Direct',
'Mail Ad',
'Affiliate Ad',
Expand All @@ -47,7 +47,7 @@ const series = [
barWidth: '60%',
label: {
show: true,
formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
formatter: (params: any) => Math.round(params.value * 1000) / 10 + '%'
},
data: rawData[sid].map((d, did) =>
totalData[did] <= 0 ? 0 : d / totalData[did]
Expand Down
4 changes: 2 additions & 2 deletions public/examples/ts/bar-stack-normalization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const grid = {
bottom: 50
};

const series = [
const series: echarts.BarSeriesOption[] = [
'Direct',
'Mail Ad',
'Affiliate Ad',
Expand All @@ -42,7 +42,7 @@ const series = [
barWidth: '60%',
label: {
show: true,
formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
formatter: (params: any) => Math.round(params.value * 1000) / 10 + '%'
},
data: rawData[sid].map((d, did) =>
totalData[did] <= 0 ? 0 : d / totalData[did]
Expand Down
7 changes: 5 additions & 2 deletions public/examples/ts/flame-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ difficulty: 4
import {
CustomSeriesRenderItem,
CustomSeriesRenderItemAPI,
CustomSeriesRenderItemParams
CustomSeriesRenderItemParams,
CustomSeriesRenderItemReturn
} from 'echarts';

declare function structuredClone(value: any, options?: any): any;

interface StackTrace {
id: string;
name: string;
Expand Down Expand Up @@ -151,7 +154,7 @@ const renderItem: CustomSeriesRenderItem = (
}
}
}
};
} as CustomSeriesRenderItemReturn;
};

myChart.showLoading();
Expand Down

0 comments on commit 5b902df

Please sign in to comment.