wahs-the-weather/lib/steelseries/scripts/RGraph.rose.min.js

2 lines
23 KiB
JavaScript
Raw Permalink Normal View History

2024-12-11 23:05:59 +00:00
typeof RGraph == "undefined" && (RGraph = {}), RGraph.Rose = function (n, t) { var r, i; for (this.id = n, this.canvas = document.getElementById(n), this.context = this.canvas.getContext("2d"), this.data = t, this.canvas.__object__ = this, this.type = "rose", this.isRGraph = !0, this.uid = RGraph.CreateUID(), this.canvas.uid = this.canvas.uid ? this.canvas.uid : RGraph.CreateUID(), this.colorsParsed = !1, RGraph.OldBrowserCompat(this.context), this.centerx = 0, this.centery = 0, this.radius = 0, this.max = 0, this.angles = [], this.properties = { "chart.background.axes": !0, "chart.background.axes.color": "black", "chart.background.grid": !0, "chart.background.grid.color": "#ccc", "chart.background.grid.size": null, "chart.background.grid.spokes": null, "chart.background.grid.count": 5, "chart.centerx": null, "chart.centery": null, "chart.radius": null, "chart.colors": ["rgba(255,0,0,0.5)", "rgba(255,255,0,0.5)", "rgba(0,255,255,0.5)", "rgb(0,255,0)", "gray", "blue", "rgb(255,128,255)", "green", "pink", "gray", "aqua"], "chart.colors.sequential": !1, "chart.colors.alpha": null, "chart.margin": 0, "chart.strokestyle": "#aaa", "chart.gutter.left": 25, "chart.gutter.right": 25, "chart.gutter.top": 25, "chart.gutter.bottom": 25, "chart.title": "", "chart.title.background": null, "chart.title.hpos": null, "chart.title.vpos": null, "chart.title.bold": !0, "chart.title.font": null, "chart.title.x": null, "chart.title.y": null, "chart.title.halign": null, "chart.title.valign": null, "chart.labels": null, "chart.labels.position": "center", "chart.labels.axes": "nsew", "chart.labels.offset": 0, "chart.text.color": "black", "chart.text.font": "Arial", "chart.text.size": 10, "chart.key": null, "chart.key.background": "white", "chart.key.position": "graph", "chart.key.halign": "right", "chart.key.shadow": !1, "chart.key.shadow.color": "#666", "chart.key.shadow.blur": 3, "chart.key.shadow.offsetx": 2, "chart.key.shadow.offsety": 2, "chart.key.position.gutter.boxed": !0, "chart.key.position.x": null, "chart.key.position.y": null, "chart.key.color.shape": "square", "chart.key.rounded": !0, "chart.key.linewidth": 1, "chart.key.colors": null, "chart.contextmenu": null, "chart.tooltips": null, "chart.tooltips.event": "onclick", "chart.tooltips.effect": "fade", "chart.tooltips.css.class": "RGraph_tooltip", "chart.tooltips.highlight": !0, "chart.highlight.stroke": "rgba(0,0,0,0)", "chart.highlight.fill": "rgba(255,255,255,0.7)", "chart.annotatable": !1, "chart.annotate.color": "black", "chart.zoom.factor": 1.5, "chart.zoom.fade.in": !0, "chart.zoom.fade.out": !0, "chart.zoom.hdir": "right", "chart.zoom.vdir": "down", "chart.zoom.frames": 25, "chart.zoom.delay": 16.666, "chart.zoom.shadow": !0, "chart.zoom.background": !0, "chart.zoom.action": "zoom", "chart.resizable": !1, "chart.resize.handle.adjust": [0, 0], "chart.resize.handle.background": null, "chart.adjustable": !1, "chart.ymax": null, "chart.ymin": 0, "chart.scale.decimals": null, "chart.scale.point": ".", "chart.scale.thousand": ",", "chart.variant": "stacked", "chart.exploded": 0, "chart.events.mousemove": null, "chart.events.click": null, "chart.animation.roundrobin.factor": 1, "chart.animation.roundrobin.radius": !0, "chart.animation.grow.multiplier": 1 }, r = RGraph.array_linearize(this.data), i = 0; i < r.length; ++i)this["$" + i] = {}; this.canvas.__rgraph_aa_translated__ || (this.context.translate(.5, .5), this.canvas.__rgraph_aa_translated__ = !0), RGraph.Register(this) }, RGraph.Rose.prototype.Set = function (n, t) { n.substr(0, 6) != "chart." && (n = "chart." + n), this.properties[n.toLowerCase()] = t }, RGraph.Rose.prototype.Get = function (n) { return n.substr(0, 6) != "chart." && (n = "chart." + n), this.properties[n.toLowerCase()] }, RGraph.Rose.prototype.Draw = function () { RGraph.FireCustomEvent(this, "onbeforedraw"), this.gutterLeft = this.Get("chart.gutter.left"), this.gutterRight = this.Get("chart.gutter.right"), this.gutterTop = this.Get("chart.gutter.top"), this.gutterBottom = this.Get("chart.gutter.bottom"), this.radius = Math.min(this.canvas.width - this.