packagephobia icon indicating copy to clipboard operation
packagephobia copied to clipboard

Load longer history on demand

Open janpio opened this issue 3 years ago • 3 comments

Great tool!

It would be great if the package page could go back further in time on demand. This would allow potentially see longer term developments in the size of a package.

janpio avatar Mar 31 '22 22:03 janpio

Hi @janpio

You can click the the left-most bar in the chart to view an older version and then the chart will shift. Keep clicking the the left-most bar to move further back in time.

styfle avatar Apr 01 '22 15:04 styfle

Ohhhhh - that was not obvious to me.

Maybe add a (<) button (or (>)) to the sides when you can do that that has the same link?

Even better (for my use case at least) would be to actually load more bars in the same view, so I can compare more and more versions. But that would probably be harder to change/implement.

janpio avatar Apr 01 '22 16:04 janpio

Another solution would be to switch from the stacked bar chart to a custom line chart to try and fit more information.

https://www.chartjs.org/docs/latest/samples/line/point-styling.html

The current Package Phobia works without any frontend JS which is kinda nice but I think its time to move to a more interactive solution.


Also note that you can provide commas to list specific versions such as

https://packagephobia.com/result?p=typescript%400.8.0%2Ctypescript%401.0.0%2Ctypescript%402.0.2%2Ctypescript%403.0.3%2Ctypescript%404.0.2

styfle avatar Apr 01 '22 17:04 styfle