Skip to content

Commit a4250b1

Browse files
authored
feat(core): add utils (#427)
1 parent a0f9ac2 commit a4250b1

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export { default as core } from './core';
1515
export { default as Theme } from './theme';
1616
export { default as Dragger } from './feature/drag';
1717
export { default as Card } from './feature/card';
18+
export { default as util } from './util';
1819
export { default as BarChart } from './components/BarChart';
1920
export { default as PieChart } from './components/PieChart';
2021
export { default as LineChart } from './components/LineChart';

src/util.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import * as echarts from 'echarts';
2+
import getTooltipContentHtmlStr from "./option/config/tooltip/formatter";
3+
4+
const util = {
5+
tooltip: {
6+
formatter: getTooltipContentHtmlStr
7+
},
8+
echarts,
9+
format: {
10+
truncateText: echarts.format.truncateText
11+
}
12+
}
13+
export default util

0 commit comments

Comments
 (0)