Projekt

Obecné

Profil

Stáhnout (2.54 KB) Statistiky
| Větev: | Tag: | Revize:
1
{
2
  "signals": [
3
    {
4
      "name": "detailDomain",
5
      "update": "[time(data('range')[0].dateMin), time(data('range')[0].dateMin) + (timeWindow * arrowCount)] "
6
    },
7
    {
8
      "name": "minMaxRange",
9
      "update": "time(data('range')[0].dateMax) - time(data('range')[0].dateMin)"
10
    },
11
    {
12
      "name": "selectionWidth",
13
      "update": "floor((arrowCount * timeWindow * width) / minMaxRange)"
14
    }
15

    
16
  ],
17
  "marks": [
18
    {
19
      "marks": [
20
        {
21
          "marks": [
22
            {
23
              "type": "symbol",
24
              "from": {
25
                "data": "table"
26
              },
27
              "encode": {
28
                "enter": {
29
                  "tooltip": {
30
                    "signal": "{title: timeFormat(datum.dateTime, '%A, %e. %B %Y, %X') }"
31
                  }
32
                },
33
                "hover": {
34
                  "fill": {
35
                    "value": "red"
36
                  }
37
                },
38
                "update": {
39
                  "shape": {
40
                    "value": "arrow"
41
                  },
42
                  "size": {
43
                    "value": 700
44
                  },
45
                  "x": {
46
                    "scale": "xDetail",
47
                    "field": "dateTime"
48
                  },
49
                  "y": {
50
                    "signal":  "detailHeight / 2"
51
                  },
52
                  "angle": {
53
                    "field": "value"
54
                  },
55
                  "color": {
56
                    "value": "both"
57
                  },
58
                  "strokeWidth": {
59
                    "value": 1
60
                  },
61
                  "fill": {
62
                    "value": "steelblue"
63
                  }
64
                }
65
              }
66
            }
67
          ]
68
        }
69
      ]
70
    },
71
    {
72
      "signals": [
73
        {
74
          "update": "[0,selectionWidth]"
75
        }
76
      ],
77
      "marks": [
78
        {},
79
        {},
80
        {},
81
        {
82
          "type": "symbol",
83
          "from": {
84
            "data": "table"
85
          },
86
          "encode": {
87
            "update": {
88
            "size": {
89
              "value": 10
90
            },
91
            "x": {
92
              "scale": "xOverview",
93
              "field": "dateTime"
94
            },
95
            "y": {
96
              "signal":  "overviewHeight / 2"
97
            },
98
            "color": {
99
              "value": "both"
100
            },
101
            "strokeWidth": {
102
              "value": 1
103
            },
104
            "fill": {
105
              "value": "steelblue"
106
            }
107
          }
108
          }
109
        }
110
      ]
111
    }
112
  ]
113
}
(4-4/4)