-
Couldn't load subscription status.
- Fork 35
Description
Download count for popular packages typically follows an exponential growth curve (e.g., screenshot in #189). By plotting exponential curves on a log-scaled Y axis they appear as straight lines, making it easier to compare multiple exponential curves to one another. It's hard to eyeball whether growth differs between curves that start at different time points (e.g., an old exponentially growing package vs. a newer one), and adding support for log-scaled vertical axes solves that problem.
Would you consider adding a checkbox to present data on a log-scaled axis? If there's interest in this I can try to figure out how to implement it properly and I'll open a PR. I'm not familiar with Angular, but I can try my best. If this feature isn't desired or you think the checkbox would be added UI clutter, no worries! I wanted to ask before I worked on this further.
Here's a quick mockup of what it could look like, although it looks like charts.js is struggling with missing data points (their log is being interpreted as zero).
| Linear Y Axis | Logarithmic Y Axis |
|---|---|
![]() |
![]() |
To create the mockup I modified this file according to the Chart.js 2.9 Log axis docs
nuget-trends/src/NuGetTrends.Web/Portal/src/app/packages/packages.component.ts
Lines 157 to 159 in 62a481b
| yAxes: [{ | |
| display: true, | |
| ticks: { |
yAxes: [{
display: true,
type: 'logarithmic',
ticks: {
