NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Generating static htmls with interactive plots

On Mon, Apr 06, 2020 at 03:00:15PM +0530, Mayuresh wrote:
> I have a NetBSD based web server which serves mainly static contents and
> files. There is one requirement to include some time series plots with
> some monthly data points - so, the plots do not need to take any
> parameters from a browser and can be statically generated.
> Only requirement is for the plots to have some interactivity, such as
> zooming, panning, mouseover text and so on.
> I hear nodejs has a collection of packages for this. But not sure about
> ability to generate a static html.
> Came across python plotly and it seems to have the ability to generate
> static htmls the way I want.
> Just wanted to know if there are more options to explore if someone has
> tried in similar situations.
> Mayuresh

To generate SVG:

> cat infile

gnuplot> set datafile separator ','
gnuplot> set term svg
gnuplot> set output 'out.svg'
gnuplot> plot 'infile' using 1:2 with lines, ''

However I don't know if it's even possible to make it zoom "correctly"
with just SVG. Certainly the default from gnuplot does not do this.

So after experimenting I think d3.js might be a better choice...

Home | Main Index | Thread Index | Old Index