Skip to content

Commit bddeda2

Browse files
committed
[fix]Add new params renderMode, support screenshot. #128
1 parent 6514413 commit bddeda2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ declare function RNEChartsPro(props: {
55
ref?:object;
66
fontFamilies?: Array<object>;
77
themeName?: string;
8+
renderMode?: string;
89
extension?: object;
910
customMapData?: object;
1011
webViewSettings?: any;

src/components/Echarts/renderChart.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ export default function renderChart(props) {
2222
echarts.registerMap('world', ${JSON.stringify(
2323
props.customMapData || getMapJSON(props?.option?.geo?.length)
2424
)});
25-
const myChart = echarts.init(eChartsContainer, '${props.themeName}');
25+
const myChart = echarts.init(eChartsContainer, '${
26+
props.themeName
27+
}',{ renderer: '${props.renderMode ? props.renderMode : "canvas"}' });
2628
// The function created by "new Function" cannot access outer scope variables,
2729
// so declare "formatterVariable" as a global value when without "let", "const" or "var" defined.
2830
${enableParseStringFunction ? "" : "let "}formatterVariable = ${toString(

0 commit comments

Comments
 (0)