Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/glacials/splits-io. a speedrunning data store and analysis engine splits.io
Something went wrong. Try again.
1.2 kB · 51 lines
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152$ -> if $("#run-duration-graph").length is 0 or gon.run.program isnt "livesplit" return
color_styles = ["rgba(14, 144, 210, 1)"]
duration_data = [] gon.run.history.forEach (attempt) -> duration_data[attempt['attempt_number']] = attempt['duration_seconds']
duration_data[0] = "Run Length" c3.generate({ bindto: "#run-duration-graph", title: { text: "Run Duration Over Time" } data: { columns: [duration_data], }, subchart: { show: true }, color: { pattern: color_styles }, line: { connectNull: true }, axis: { x: { type: "category", categories: index + 1 for split, index in gon.run.history, tick: { culling: true, multiline: false }, label: { text: "Run Number", position: "outer-center" } }, y: { label: { text: "Duration of Run", position: "outer-middle" }, tick: { format: (d) -> moment.utc(moment.duration(d, "seconds").asMilliseconds()).format("H:mm:ss") } } }, legend: { hide: true } })