diff --git a/.DS_Store b/.DS_Store
index b9ff8c5..51b4850 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/build/index.html b/build/index.html
index bc9eb26..190ff21 100644
--- a/build/index.html
+++ b/build/index.html
@@ -8,7 +8,7 @@
NPCs
-
+
diff --git a/build/locales/zh/bs.json b/build/locales/zh/bs.json
index b2ff614..ffd11a9 100644
--- a/build/locales/zh/bs.json
+++ b/build/locales/zh/bs.json
@@ -179,6 +179,7 @@
"machineName": "服务名",
"addOne": "加一条"
},
+
"flow": {
"unsavedChangesConfirmation": "您有未保存的更改,确定要离开吗?",
"leave": "离开",
diff --git a/src/components/Chart/index.tsx b/src/components/Chart/index.tsx
index 4f42504..69f20af 100644
--- a/src/components/Chart/index.tsx
+++ b/src/components/Chart/index.tsx
@@ -6,25 +6,84 @@ function Chart({ options }) {
let chartInstance = null;
options = eval('('+options.substring(8)+')');
- console.log(options)
-
- const options1 = {
- tooltip: {},
- legend: {
- data: [""],
- },
- xAxis: {
- data: options.data.map(obj => {return obj.name}),
- },
- yAxis: {},
- series: [
- {
- name: "",
- type: options.chartType,
- data: options.data.map(obj => {return obj.value}),
- },
+ options = {
+ "chartType": "line",
+ "xData": [
+ "江苏",
+ "浙江",
+ "广东",
+ "广州",
+ "北京",
+ "山西",
+ "河北"
],
-};
+ "data": {
+ "2023上半年":['120%', '132%', '101%', '134%', '90%', '230%', '210%'],
+ "2024上半年":['220%', '182%', '191%', '234%', '290%', '330%', '310%']
+ },
+ "legend": [],
+ "pieData": []
+ }
+ options.legend = Object.keys(options.data);
+ options.pieData = [];
+ options.series = [];
+
+ options.xData.map((data,index) =>{
+ options.pieData.push({'name':data,'value':options.data[options.legend[0]][index].split("%").join("")})
+ })
+ options.legend.map((data,index) =>{
+ let list = [];
+ options.data[data].map(data1 =>{
+ list.push(data1.split("%").join(""))
+ });
+ options.series.push({
+ name: data,
+ type: options.chartType,
+ data: list,
+ })
+ })
+ console.log(options)
+ let options1;
+ if(options.chartType == "pie"){
+ options1 = {
+ tooltip: {},
+ series: [
+ {
+ name: 'Access From',
+ type: 'pie',
+ radius: '50%',
+ label: {
+ normal: {
+
+ textStyle: { // 提示文字的样式
+ color: '#fff',
+ fontSize: 14
+ }
+ }
+ },
+ data: options.pieData,
+ emphasis: {
+ itemStyle: {
+ shadowBlur: 10,
+ shadowOffsetX: 0,
+ shadowColor: 'rgba(0, 0, 0, 0.5)'
+ }
+ }
+ }
+ ]
+ };
+ }else{
+ options1 = {
+ tooltip: {
+ trigger: 'axis'
+ },
+ xAxis: {
+ data: options.xData,
+ },
+ yAxis: {},
+ series: options.series,
+ };
+ }
// 定义渲染函数
function renderChart() {
try {