hqchart 1.1.14340 → 1.1.14354

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1864,6 +1864,8 @@ HQData.Report_APIIndex=function(data, callback)
1864
1864
  HQData.APIIndex_DRAW_SIMPLE_PIE(data, callback);
1865
1865
  else if (request.Data.indexname=="API_DRAW_SIMPLE_RADAR")
1866
1866
  HQData.APIIndex_DRAW_SIMPLE_RADAR(data, callback);
1867
+ else if (request.Data.indexname=="API_MULTI_BAR")
1868
+ HQData.APIIndex_MULTI_BAR(data, callback);
1867
1869
 
1868
1870
  }
1869
1871
 
@@ -2462,3 +2464,70 @@ HQData.APIIndex_DRAW_SIMPLE_RADAR=function(data, callback)
2462
2464
  }
2463
2465
 
2464
2466
 
2467
+ HQData.APIIndex_MULTI_BAR=function(data, callback)
2468
+ {
2469
+ data.PreventDefault=true;
2470
+ var hqchart=data.HQChart;
2471
+ var kData=hqchart.GetKData();
2472
+
2473
+ var barData=
2474
+ {
2475
+ name:'MULTI_BAR', type:1,
2476
+ Draw:
2477
+ {
2478
+ DrawType:'MULTI_BAR',
2479
+ DrawData:[]
2480
+ } //绘制柱子数组
2481
+ };
2482
+
2483
+ //第一组柱子
2484
+ var point=
2485
+ {
2486
+ Color:'rgb(148,0,211)', //颜色
2487
+ Type:0,
2488
+ Name:"柱子上部",
2489
+ Point:
2490
+ [
2491
+ //{Date:20190916, Time: Value:15.5, Value2:0 },
2492
+ ],
2493
+ Width:10
2494
+ };
2495
+
2496
+ var point2=
2497
+ {
2498
+ Color:'rgb(55,228,181)', //颜色
2499
+ Type:1,
2500
+ Name:"柱子下部",
2501
+ Point:
2502
+ [
2503
+ //{Date:20190916, Time: Value:15.5, Value2:0 },
2504
+ ],
2505
+ Width:20
2506
+ };
2507
+
2508
+ for(var i=0;i<kData.Data.length;++i)
2509
+ {
2510
+ var item=kData.Data[i];
2511
+ point.Point.push({Date:item.Date, Time:item.Time, Value:(item.High+item.Low)/2, Value2:item.High});
2512
+ point2.Point.push({Date:item.Date, Time:item.Time, Value:(item.High+item.Low)/2, Value2:item.Low});
2513
+ }
2514
+
2515
+
2516
+
2517
+ barData.Draw.DrawData.push(point);
2518
+ barData.Draw.DrawData.push(point2);
2519
+
2520
+ var apiData=
2521
+ {
2522
+ code:0,
2523
+ stock:{ name:hqchart.Name, symbol:hqchart.Symbol },
2524
+ outdata: { date:kData.GetDate(), time:kData.GetTime() , outvar:[barData] }
2525
+ };
2526
+
2527
+
2528
+ console.log('[HQData.APIIndex_MULTI_BAR] apiData ', apiData);
2529
+ callback(apiData);
2530
+
2531
+ }
2532
+
2533
+