Socket
Book a DemoInstallSign in
Socket

@ohmi/react-native-echarts-pro-fix

Package Overview
Dependencies
Maintainers
7
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ohmi/react-native-echarts-pro-fix

> 模板版本:v0.2.2

latest
Source
npmnpm
Version
0.0.3-0.0.1
Version published
Maintainers
7
Created
Source

模板版本:v0.2.2

@ohmi/react-native-echarts-pro-fix

Supported platforms License

[!TIP] Gitee 地址

安装与使用

请到三方库的 Releases 发布地址查看配套的版本信息:@ohmi/react-native-echarts-pro-fix Releases 。对于未发布到 npm 的旧版本,请参考安装指南安装 tgz 包。

进入到工程目录并输入以下命令:

npm

npm install @ohmi/react-native-echarts-pro-fix

yarn

yarn add @ohmi/react-native-echarts-pro-fix

下面的代码展示了这个库的基本使用场景:

[!WARNING] 使用时 import 的库名不变。

import React from "react";
import { View } from "react-native";
import RNEChartsPro from "react-native-echarts-pro-fix";

export default function RNEPDemo() {
	const pieOption = {
		series: [
			{
				name: "Source",
				type: "pie",
				legendHoverLink: true,
				hoverAnimation: true,
				avoidLabelOverlap: true,
				startAngle: 180,
				radius: "55%",
				center: ["50%", "35%"],
				data: [
					{ value: 105.2, name: "android" },
					{ value: 310, name: "iOS" },
					{ value: 234, name: "web" }
				],
				label: {
					normal: {
						show: true,
						textStyle: {
							fontSize: 12,
							color: "#23273C"
						}
					}
				}
			}
		]
	};
	return (
		<View style={{ height: 300, paddingTop: 25 }}>
			<RNEChartsPro height={250} option={pieOption} />
		</View>
	);
}

本库依赖 @ohmi/react-native-webview ,如已在鸿蒙工程中引入过该库,则无需再次引入。

如未引入请参照@ohmi/react-native-webview 文档进行引入。

属性

[!TIP] "Platform"列表示该属性在原三方库上支持的平台。

[!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。

Props

NameDescriptiondefaultTypeRequiredPlatformHarmonyOS Support
height图表区域高度400Numberyesallyes
width图表区域宽度autoNumbernoallyes
option图表核心配置项,请参考:Apache ECharts - optionsnullObjectyesallyes
backgroundColor背景颜色transparentStringnoallyes
themeName内置主题 ,六种可选: vintage dark macarons infographic shine roma---Stringnoallyes
webViewSettings自定义 WebView 容器属性nullObjectnoallyes
formatterVariable如果 formatter 使用了动态单位变量,使用此属性传入nullObjectnoallyes
extension动态扩展支持,如词云、水球图等nullObjectnoallyes
customMapData自定义地图数据,默认为世界地图 JSONworld JSONObjectnoallyes
eventActions自定义传入事件nullObjectnoallyes
fontFamilies自定义字体数组[]Arraynoallyes
enableParseStringFunction开启后,function 将以字符串进行传递falseBooleannoallyes

Method

NameDescriptionParamsRequiredPlatformHarmonyOS Support
setNewOption重新设置图表 option.option(require), optionSetting?noallyes
getInstance获取图表 instance.functionName, params?noallyes
dispatchAction图表事件监听.callbackData?noallyes

遗留问题

其他

开源协议

本项目基于 The MIT License (MIT) ,请自由地享受和参与开源。

Keywords

react-native

FAQs

Package last updated on 30 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts