|
56 | 56 | } |
57 | 57 | ], |
58 | 58 | }, |
| 59 | + "chartjs-zoom": { |
| 60 | + "url": "https://cdn.jsdelivr.net/npm/chartjs-plugin-zoom@2.0.0/dist/", |
| 61 | + "js": [ |
| 62 | + { |
| 63 | + "path": "chartjs-plugin-zoom.min.js", |
| 64 | + "sri": "sha384-AC/SQgflSDa6sFR0rk5chlHjSLMS9fHmSE50vY7uoBiqrCWtDUXoOBCKaoQQFBrl", |
| 65 | + } |
| 66 | + ], |
| 67 | + }, |
| 68 | + "hammerjs": { |
| 69 | + "url": "https://cdn.jsdelivr.net/npm/hammerjs@2.0.8/", |
| 70 | + "js": [ |
| 71 | + { |
| 72 | + "path": "hammer.min.js", |
| 73 | + "sri": "sha384-Cs3dgUx6+jDxxuqHvVH8Onpyj2LF1gKZurLDlhqzuJmUqVYMJ0THTWpxK5Z086Zm", |
| 74 | + } |
| 75 | + ], |
| 76 | + }, |
59 | 77 | } |
60 | 78 |
|
61 | 79 |
|
|
328 | 346 |
|
329 | 347 | # hook sentry_dynamic_sampling_lib into sentry |
330 | 348 | init_wrapper() |
| 349 | + |
| 350 | + |
| 351 | +# Graph |
| 352 | +DEFAULT_GRAPH_OPTION = { |
| 353 | + "aspectRatio": 4, |
| 354 | + "scales": { |
| 355 | + "xAxis": {"type": "timeseries"}, |
| 356 | + "series": {"position": "left", "min": 0}, |
| 357 | + "signal": {"position": "right", "min": 0, "max": 2}, |
| 358 | + }, |
| 359 | + "plugins": { |
| 360 | + "legend": {"position": "bottom"}, |
| 361 | + "title": {"display": True, "text": "Detection Result"}, |
| 362 | + "zoom": { |
| 363 | + "zoom": { |
| 364 | + "wheel": {"enabled": True, "modifierKey": "ctrl"}, |
| 365 | + "pinch": {"enabled": True}, |
| 366 | + "mode": "x", |
| 367 | + }, |
| 368 | + "limits": {"xAxis": {"min": "original", "max": "original"}}, |
| 369 | + "pan": {"enabled": True, "mode": "x", "modifierKey": "ctrl"}, |
| 370 | + }, |
| 371 | + }, |
| 372 | + "elements": {"line": {"stepped": True}, "point": {"radius": 0}}, |
| 373 | + "interaction": {"mode": "index", "intersect": False}, |
| 374 | +} |
0 commit comments