Procházet zdrojové kódy

新增 成交量订单 柱形图,该功能试用 可行再优化

hl před 1 rokem
rodič
revize
172f6c4e1f
2 změnil soubory, kde provedl 16 přidání a 10 odebrání
  1. 15 9
      src/hl_pr_utile.rs
  2. 1 1
      src/main.rs

+ 15 - 9
src/hl_pr_utile.rs

@@ -312,10 +312,13 @@ pub fn export_html(name_html: &str, pancake_data_y: Vec<String>, pancake_data_x:
                 text: '{{name_html}}帧交易量分析图'
               },
               tooltip: {
-                trigger: 'axis',
                 axisPointer: {
-                  type: 'shadow'
-                }
+                          type: 'cross',
+                          lineStyle: {
+                              type: 'dashed',
+                              width: 1
+                          }
+                      }
               },
               legend: {},
               grid: {
@@ -358,10 +361,13 @@ pub fn export_html(name_html: &str, pancake_data_y: Vec<String>, pancake_data_x:
                     }
                   },
                   tooltip: {
-                    trigger: 'axis',
-                    axisPointer: {
-                      type: 'shadow'
-                    }
+                   axisPointer: {
+                          type: 'cross',
+                          lineStyle: {
+                              type: 'dashed',
+                              width: 1
+                          }
+                      }
                   },
                   grid: {
                     bottom: 90
@@ -378,10 +384,10 @@ pub fn export_html(name_html: &str, pancake_data_y: Vec<String>, pancake_data_x:
                     data:  " + json_data["turnover_data_x"].to_string().as_str() + ",
                     silent: false,
                     splitLine: {
-                      show: false
+                      show: true
                     },
                     splitArea: {
-                      show: false
+                      show: true
                     }
                   },
                   yAxis: {

+ 1 - 1
src/main.rs

@@ -70,6 +70,6 @@ async fn main() {
         // "4Z" => (1000 * 60 * 60 * 24 * 7 * 4),
         // 提示: 1. 代码颗粒度为秒级,100毫秒与999毫秒都归纳于1秒之内,
         //       2. 不同币对成交量可能存在差异,当前查询是1000条已经是最大值,但是有点币对交易量只有几百,但是有的可能好几千,这个需要酌情调整
-        hl_pr_utile::export_ticker("XRP_USDT","GATE","1H").await;
+        hl_pr_utile::export_ticker("XRP_USDT","GATE","30M").await;
     }
 }