liyongli 2 ani în urmă
părinte
comite
970b0e2cd5

+ 16 - 0
.eslintrc.json

@@ -0,0 +1,16 @@
+{
+    "env": {
+        "browser": true,
+        "es2021": true
+    },
+    "extends": "eslint:recommended",
+    "parserOptions": {
+        "ecmaVersion": "latest",
+        "sourceType": "module",
+        "ecmaFeatures":{
+            "jsx": true
+        }
+    },
+    "rules": {
+    }
+}

+ 4 - 0
package.json

@@ -9,7 +9,11 @@
   },
   "license": "MIT",
   "devDependencies": {
+    "eslint": "^8.15.0",
+    "eslint-plugin-react": "^7.29.4",
+    "eslint-plugin-solid": "^0.4.7",
     "vite": "^2.5.7",
+    "vite-plugin-eslint": "^1.6.0",
     "vite-plugin-solid": "^2.0.3"
   },
   "dependencies": {

+ 1 - 1
src/pages/bigScreen/components/Column_g2.jsx

@@ -42,7 +42,7 @@ registerShape('interval', 'triangle', {
                     ['L', points[3].x, points[3].y],
                 ],
                 fillOpacity: 0.95,
-                fill: `l(90) 0:rgb(${cli1[index % cli1.length]}) 1:rgba(${cli1[index % cli1.length]}, 0.8)`
+                fill: `rgb(${cli1[index % cli1.length]})`
             },
         });
         index++

+ 15 - 0
src/pages/bigScreen/components/ListeningRate_g2.jsx

@@ -4,6 +4,19 @@ import { Chart,registerShape } from '@antv/g2';
 
 import "../../../assets/style/BigScreenHome.css"
 
+let cli1 = [
+    "135,206,250",
+    "0,191,255",
+    "127,255,170",
+    "0,255,127",
+    "50,205,50",
+    "240,230,140",
+    "255,215,0",
+    "255,127,80",
+    "255,99,71",
+    "255,0,0",
+], index = 0;
+
 // 绘制原型柱状图
 registerShape('point', 'circular', {
     // 1. 定义关键点
@@ -101,6 +114,8 @@ function ListeningRate(prop) {
                     offsetX: 30,
                 });
         });
+        index = 0;
+        chart.point().position('type*value').shape('circular');
         chart.render();
     }
     onMount(() => {

+ 4 - 4
src/pages/bigScreen/components/NewMediaTrend.jsx

@@ -46,11 +46,11 @@ function Usertrend(prop) {
         chart.data(data);
         chart.legend({
             position: "top",
-            marker:{
-                symbol:"hyphen"
+            marker: {
+                symbol: "hyphen"
             },
-            itemName:{
-                style:{
+            itemName: {
+                style: {
                     fill: "#ffffff",
                 }
             }

Fișier diff suprimat deoarece este prea mare
+ 662 - 11
yarn.lock


Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff