dub-registry icon indicating copy to clipboard operation
dub-registry copied to clipboard

show stats as graph

Open wilzbach opened this issue 9 years ago • 7 comments

I really like the stats at the sublime registry:

image https://packagecontrol.io/packages/SublimeLinter-contrib-stylelint

As we already have the API, we could just show a similar graph with a bit of JS?

https://code.dlang.org/api/packages/mir/stats

wilzbach avatar May 27 '16 14:05 wilzbach

I just saw that Rust provides a similar nice overview:

image

https://crates.io/crates/abomonation

wilzbach avatar May 28 '16 16:05 wilzbach

Do we want server-side or client-side images? We don't even have jQuery atm. Would be a fun opportunity to check out ggplotd.

MartinNowak avatar Jun 18 '17 18:06 MartinNowak

Do we want server-side or client-side images? >We don't even have jQuery atm. Would be a fun opportunity to check out ggplotd.

You probably want to support all devices nicely, so there isn't a good way around JavaScript. Also people love interactivity...

If you worry about the performance impact, the plotting library will be cached on the second time a user requests it, but I actually don't think that something like Plotly or c3 will be a big deal... Especially if it's not put in the HTML header and thus blocking the first page load.

wilzbach avatar Jun 18 '17 20:06 wilzbach

+1 for using client-side charts (as much as I dislike JS). I used to work for UI controls company, and I can tell you from experience that doing any server-side charting besides coarse-grained data processing has only downsides:

  • Very bad performance:
    • Server-side rendering is very CPU and network intensive (assuming the result is a an image). The results can be cached, but this means almost no interactivity.
      • most client-side UI events require a request to the server. In addition to bad UX, this increases the load on the server.
      • Some combinations of chart features can expose performance bottlenecks, which opens serface for DoS attack.
  • Bad UX
    • Raster graphics are not easily adaptable to different resolutions / form factors
    • Anti-aliasing is not practical for performance reasons.
  • etc.

PetarKirov avatar Jun 18 '17 22:06 PetarKirov

Would be my gut feeling as well @ZombineDev. Any suggestions other than https://highcharts.com?

MartinNowak avatar Aug 08 '17 09:08 MartinNowak

Well, if anything server side, I'd output SVG, which does not have those issues. But I don't mind client-side either.

s-ludwig avatar Aug 08 '17 09:08 s-ludwig

Any suggestions other than https://highcharts.com?

Plotly, c3, ..

wilzbach avatar Aug 08 '17 10:08 wilzbach