Skip to content

Commit

Permalink
[fix] If not use map, always load map-JSON.
Browse files Browse the repository at this point in the history
  • Loading branch information
supervons committed Aug 22, 2022
1 parent 35f0963 commit 38e5b51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/components/Echarts/map/worldJson.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/components/Echarts/renderChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Support dataZoom/legendselectchanged/click listener.
*/
import { Platform, Dimensions } from "react-native";
import worldJson from "./map/worldJson";
import getMapJSON from "./map/worldJson";
import toString from "../../util/toString";
const isiOS = Platform.OS === "ios";
const displayScale =
Expand All @@ -19,7 +19,7 @@ export default function renderChart(props) {
eChartsContainer.style.width = "${width}";
eChartsContainer.style.background = "${props.backgroundColor}";
echarts.registerMap('world', ${JSON.stringify(
props.customMapData || worldJson
props.customMapData || getMapJSON(props?.option?.geo?.length)
)});
const myChart = echarts.init(eChartsContainer, '${props.themeName}');
let formatterVariable = ${toString(props.formatterVariable || "")};
Expand Down

0 comments on commit 38e5b51

Please sign in to comment.