Projekt

Obecné

Profil

Stáhnout (1.92 KB) Statistiky
| Větev: | Tag: | Revize:
1 8b522708 Štěpán Červenka
{
2
  "signals": [
3
    {},
4
    {
5
      "name": "detailDomain",
6
      "update": "[time(data('range')[0].dateMin), time(data('range')[0].dateMin) + ((timeStep * 1000) * arrowCount)] "
7
    },
8
    {
9
      "name": "arrowCount",
10
      "value": 25
11
    },
12
    {
13
      "name": "minMaxRange",
14
      "update": "time(data('range')[0].dateMax) - time(data('range')[0].dateMin)"
15
    },
16
    {
17
      "name": "selectionWidth",
18
      "update": "floor((arrowCount * (timeStep * 1000) * width) / minMaxRange)"
19
    }
20
21
  ],
22
  "marks": [
23
    {
24
      "marks": [
25
        {
26
          "marks": [
27
            {
28
              "type": "symbol",
29
              "from": {
30
                "data": "table"
31
              },
32
              "encode": {
33
                "enter": {
34
                  "tooltip": {
35
                    "signal": "{title: timeFormat(datum.dateTime, '%A, %e. %B %Y, %X') }"
36
                  }
37
                },
38
                "hover": {
39
                  "fill": {
40
                    "value": "red"
41
                  }
42
                },
43
                "update": {
44
                  "shape": {
45
                    "value": "arrow"
46
                  },
47
                  "size": {
48
                    "value": 500
49
                  },
50
                  "x": {
51
                    "scale": "xDetail",
52
                    "field": "dateTime"
53
                  },
54
                  "y": {
55
                    "value": 30
56
                  },
57
                  "angle": {
58
                    "field": "avg"
59
                  },
60
                  "color": {
61
                    "value": "both"
62
                  },
63
                  "strokeWidth": {
64
                    "value": 1
65
                  },
66
                  "fill": {
67
                    "value": "steelblue"
68
                  }
69
                }
70
              }
71
            }
72
          ]
73
        }
74
      ]
75
    },
76
    {
77
      "signals": [
78
        {
79
          "update": "[0,selectionWidth]"
80
        }
81
      ]
82
    }
83
  ]
84
}