Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 66c042f1

Přidáno uživatelem Štěpán Červenka před více než 3 roky(ů)

Re #8775 - Agregovat grafy se stejným typem sensoru

  • bugs fixed
  • sensors and units sending request to new methods
  • ready for observation data

Zobrazit rozdíly:

src/app/shared/graph-loading/graphloader.ts
10 10
export class GraphLoader {
11 11

  
12 12

  
13
  static getGraphType(sensors, data, isAnalytics): Graph {
13
  static getGraphType(sensors, data, legend, isAnalytics): Graph {
14 14
    if (sensors == null) {
15 15
      return new EmptyGraph("Selected no sensors.");
16 16

  
17
    } else if (Array.isArray(sensors)) {
17
    }  else if (Array.isArray(sensors)) {
18 18
      if (sensors.length == 0) {
19 19
        return new EmptyGraph("Selected no sensors.");
20 20
      } else if (sensors.length == 1) {
21
        return new SingleGraph(sensors[0], isAnalytics, data, 10000);
21
        return new SingleGraph(sensors[0], isAnalytics, data, legend,10000);
22 22
      } else {
23
        return new MultiGraph(isAnalytics, data, 10000);
23
        return new MultiGraph(isAnalytics, data, legend,10000);
24 24
      }
25 25

  
26 26
    } else {
27
      return new SingleGraph(sensors, isAnalytics, data, 10000);
27
      return new SingleGraph(sensors, isAnalytics, data, legend, 10000);
28 28
    }
29 29
  }
30 30

  
31 31

  
32
  static getGraph(sensors, data, element, isAnalytics) {
33
    let graph = this.getGraphType(sensors,data, isAnalytics);
32
  static getGraph(sensors, data, legendInfo, element, isAnalytics) {
33
    let graph = this.getGraphType(sensors,data, legendInfo, isAnalytics);
34 34
    let config = graph.getConfig();
35 35
    let spec = graph.getSpec();
36
    spec['data'][0].values = data;
36

  
37 37

  
38 38
    this.showGraph(spec, config, element);
39 39

  

Také k dispozici: Unified diff