Projekt

Obecné

Profil

Stáhnout (2.56 KB) Statistiky
| Větev: | Tag: | Revize:
1 8b522708 Štěpán Červenka
{
2
  "signals": [
3 c1664074 Štěpán Červenka
    {},
4
    {},
5 8b522708 Štěpán Červenka
    {
6
      "name": "detailDomain",
7 66c042f1 Štěpán Červenka
      "update": "[time(data('range')[0].dateMin), time(data('range')[0].dateMin) + (timeWindow * arrowCount)] "
8 8b522708 Štěpán Červenka
    },
9
    {
10
      "name": "minMaxRange",
11
      "update": "time(data('range')[0].dateMax) - time(data('range')[0].dateMin)"
12
    },
13
    {
14
      "name": "selectionWidth",
15 66c042f1 Štěpán Červenka
      "update": "floor((arrowCount * timeWindow * width) / minMaxRange)"
16 8b522708 Štěpán Červenka
    }
17
18
  ],
19
  "marks": [
20
    {
21
      "marks": [
22
        {
23
          "marks": [
24
            {
25
              "type": "symbol",
26
              "from": {
27
                "data": "table"
28
              },
29
              "encode": {
30
                "enter": {
31
                  "tooltip": {
32
                    "signal": "{title: timeFormat(datum.dateTime, '%A, %e. %B %Y, %X') }"
33
                  }
34
                },
35
                "hover": {
36
                  "fill": {
37
                    "value": "red"
38
                  }
39
                },
40
                "update": {
41
                  "shape": {
42
                    "value": "arrow"
43
                  },
44
                  "size": {
45 66c042f1 Štěpán Červenka
                    "value": 700
46 8b522708 Štěpán Červenka
                  },
47
                  "x": {
48
                    "scale": "xDetail",
49
                    "field": "dateTime"
50
                  },
51
                  "y": {
52 66c042f1 Štěpán Červenka
                    "signal":  "detailHeight / 2"
53 8b522708 Štěpán Červenka
                  },
54
                  "angle": {
55 66c042f1 Štěpán Červenka
                    "field": "value"
56 8b522708 Štěpán Červenka
                  },
57
                  "color": {
58
                    "value": "both"
59
                  },
60
                  "strokeWidth": {
61
                    "value": 1
62
                  },
63
                  "fill": {
64
                    "value": "steelblue"
65
                  }
66
                }
67
              }
68
            }
69
          ]
70
        }
71
      ]
72
    },
73
    {
74
      "signals": [
75
        {
76
          "update": "[0,selectionWidth]"
77
        }
78 66c042f1 Štěpán Červenka
      ],
79
      "marks": [
80
        {},
81
        {},
82
        {},
83
        {
84
          "type": "symbol",
85
          "from": {
86
            "data": "table"
87
          },
88
          "encode": {
89
            "update": {
90
            "size": {
91
              "value": 10
92
            },
93
            "x": {
94
              "scale": "xOverview",
95
              "field": "dateTime"
96
            },
97
            "y": {
98
              "signal":  "overviewHeight / 2"
99
            },
100
            "color": {
101
              "value": "both"
102
            },
103
            "strokeWidth": {
104
              "value": 1
105
            },
106
            "fill": {
107
              "value": "steelblue"
108
            }
109
          }
110
          }
111
        }
112 8b522708 Štěpán Červenka
      ]
113
    }
114
  ]
115
}