Escape Google!
This script replaces the google-generated bar chart on your AO3 stats page, so that you can still view your stats graphically without needing to enable google scripts. Block google, and still see your stats compared in an intuitive fashion!
Enjoy New Features!
Like to be able to see more / fewer stories compared? Want your bar chart in lurid green? This script has you covered!
Prefer a different font or font size to make it easier on your eyes? No problem! You can even change the relative height of the bar chart so it’s not quite so squashed.
Easy to Configure (Hopefully)
Configuration options can be found at the top of the script, clearly marked with /* Settings */. Your options are:
- The fill colour for the bars, as a single hex value. You can find the hex value of a colour you like by looking at the colour picker in most image editing programs.
- The text colour for the numeric values inside the bars, also as a single hex value. (I prefer this to the mouseover numbers, and also I don’t know how to do mouseover.)
- How many bars to show on the bar chart. It will accept any number, and if you have fewer stories than the number you input, will automatically cut it down to the number of stories you actually have.
- The ratio of chart width to chart height. A value of 10 means it will be 10 times as wide as it is tall; a value of 5 means it will be 5 times as wide as it is tall. The width of the chart is always determined by the width available to your AO3 stats page, so it shouldn’t overflow the screen. If you want your bar chart to be taller than it is wide, use fractional values, e.g. 1/4 (four times as tall as it is wide).
- The font size for the Y-axis title, if the default size is hard on your eyes. Measured in px (pixels).
- The font for the Y-axis title, if you find another font prettier / easier to read.
- The font size for all the other parts of the chart (fic names, statistics, etc.). Measured in px.
- The font for all parts of the chart except the Y-axis.
- The format to display numbers in, mostly setting the thousands separator or whatever other numerical separator your language uses.
- The sorting type to display when AO3 is sorting works by date.
- Support for gradients and alternating colours in your bar charts. A bit fiddly and might break.
Note that it can only work with stories that appear on the page. If you ask it to display more stories than are visible on your stats page, it won’t be able to see them.
Probably Maintained
I will probably be updating this script as long as I am posting fanfic. So, if there’s some feature that isn’t working or that you’d really, really like to see, drop me a message. I’ll notice it at some point and see what I can do.
Or, if you know what you’re doing better than I did when I wrote this, just go ahead and edit it yourself. If you show me a code update that will make things work, or look, better, I’ll be happy to include it.
Tested on Firefox with Violentmonkey on Linux. I can’t troubleshoot other browsers directly, but I’ll at least search the internet to see if there are any known bugs that match your error report.
Confirmed tested on Firefox with Violentmonkey on Windows 10.
Feature Requests / To Do
- High Priority
- Medium Priority
- Low Priority
- Requested 2024-05-18: Support for CSS colours for rainbow bar charts. Will require me to learn how to do that in CSS, so probably not happening very soon. I’ve added it to the list, though; it does sound neat.
- Completed
Requested 2024-05-18: Support for rainbow bar charts. Added in v1.4. You can now have gradient and/or multicolour bars! Or write your own code in the new code hook spot…Intended Upgrade: Improve the y-axis numbering scheme. Completed in v1.3.Intended Upgrade: Thousands separator for large numbers, for readability. Completed in v1.3 with bonus internationalisation.Intended Upgrade + Requested 2024-05-18: Word wrap support for long titles. Completed in v1.2, bar any errors being discovered.Bugfix: Graph does not appear when sorting by date! Fix date sorting! (Mostly) Fixed in v1.1.