IRCaBot 2.1.0
GPLv3 © acetone, 2021-2022
#i2p-dev
/2022/11/19
dr|z3d zzz: don't know if you recall a brief conversation we had before about svg graphs with a library to handle conversion from rrd4j. anyways, xmlgraphics.apache.org/batik/using/svg-generator.html
dr|z3d looks promising. there's also github.com/haraldk/TwelveMonkeys which leverages the above.
zzz dr|z3d, what's your svg idea?
dr|z3d zzz: in essence, render the graphs as svgs.
zzz yeah but why
dr|z3d and perhaps later, add some interactivity.
dr|z3d the why is much better quality output.
zzz yeah, well there's two parts to the apache thing
zzz 1) making svgs in java, great, but other than smaller graphs, maybe quality, not that interesting
zzz 2) manipulating the svg as part of the DOM (interactivity)
dr|z3d that would be the scripting module I think, no?
zzz that's where it gets interesting. see e.g. fivethirtyeight.com Biden approval tracker
dr|z3d yeah, scroll backwards and forwards in time, that sort of thing, zoom, tooltips at the pointer etc.
zzz the thing is, the apache lib is talking about DOM manipulation via a java applet which sounds positively stone age
zzz the modern way would be js which I assume is what 538 does. nobody's loading java applets off the web
dr|z3d indeed not, forget that part. the scripting would be the way to go.
zzz but I think you'd want something already adapted specifically for rrd4j output. We may have taken a look at something long ago
zzz or something that is specifically chart-oriented
zzz because you need to find the element tags for each line, the axes, legend, etc
dr|z3d yeah, that would be phase 2. phase 1 would be just getting the graphs rendered as svgs. that part looks fairly uncomplicated.
zzz sure but don't bother with phase 1 unless you finish phase 2 ))
dr|z3d let's see if we can turf up something vaguely useful.
dr|z3d I guess you're hoping for something along these lines, re manipulation: github.com/oetiker/RrdGraphJS
zzz not that one, but we've looked at similar before
zzz don't want to discourage you but you may end up watering the turf with your tears
dr|z3d I think I'd be happy enough with just svgs being rendered instead of bitmaps. bitmaps look pretty bad at hidpi.
dr|z3d they don't look great at any dpi, to be honest. functional, but not great.
dr|z3d as for what we looked at before, if that was something I referenced, I don't think it was the "full package", more just a bitmap -> svg transcoder.
zzz so in theory, you tell rrd4j that you want a year-wide graph, 10K pixels high and 100K wide, output as svg, hope it doesn't blow up, and shrink/crop/adjust the dom in js
zzz sounds like a big project, not easy
dr|z3d or you'd just stream the data as required and render on the fly, perhaps?
dr|z3d I agree, phase 2, some work involved. phase 1 looks like a shoe-in.
zzz sure, just re-render server-side on every js requset with XHR, that's a lot easier, but you can do that today with PNG and js, that's what RrdGraphJS looks to be
dr|z3d if you can do that with png, you can do it just as well with svg, probably. the batik lib just builds on the java2d lib.
dr|z3d not something I've done much with, if anything, but using json to stream the graph data might also be doable, so you're not re-rendering the entire graph on every xhr request.
dr|z3d possibly this: sourceforge.net/projects/rrd2svg is what we looked at before, not sure.
zzz the single graph page is most of the way there already, just hang js off all the bigger/smaller/older/etc. buttons
zzz that's straightfoward and worth doing. the rest, not so much
dr|z3d the other thing we get with svgs which I forgot to mention is css support, so no need for kludgy theme-specific hacks.
dr|z3d (see the sidebar mini-graph in the dark theme for one such nasty, nasty hack :))
acetone dr|z3d: zzz: powerful frontend lunched: outproxy.acetone.i2p
dr|z3d nice, acetone
dr|z3d not entirely sure displaying addresses is a good thing, but that's your call.