WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Sparkplug

Provides a widget (or template tag) to show a small sparkline chart with your the number of posts per day.

Usage

Sparkplug can be used either as a widget, directly within a theme file.

NOTE: You may only have ONE instance of Sparkplug appear on a page at a time. It will automatically detect if there has already been one and subsequent requests for it will be ignored.

Widget

  1. Go to Appearance > Widgets and switch to the sidebar you want Sparkplug to appear in
  2. Click the "Add" link on the "Sparkplug" widget.
  3. Drag and Drop the widget to the position in your sidebar you want it to appear. It goes nicely at the top :)
  4. Now click the "Edit" link on the widget over on the right
  5. Set the colors you want (using full hex codes e.g. #1a2b3c), how many days you'd like the chart to be for, and whether or not you want the line to appear on non-home page charts.
  6. Click "Done" and then save your changes.
  7. Refresh your blog and bask in the glory that is Sparkplug!

Template Tag

Sparkplug comes with a simple template tag that you can use in any template file in your theme. It gives you a little more control over the output as well, in case you want to do something a little different.

Use this to output the default Sparkplug:

<?php sparkplug() ?>

There are a number of options you can use to configure the output, which are passed as an associative array like this:

<?php sparkplug( array( 'barColor' => '#ff0000' ) ) ?>

The full list of available options is:

  • do_total = bool -- should we display a line showing the total number of posts per day
  • days = int -- how many days of data should we show
  • barColor = hex -- the color of the bars on the chart
  • barWidth = int -- how many pixels wide should the bars be
  • barHeight = string -- CSS-style specification of the height of the chart (e.g. 20px)
  • minSpotColor = hex/bool -- a hex value to show a colored spot on the lowest point in the chart, or false to show none
  • maxSpotColor = hex/bool -- a la minSpotColor
  • spotRadius = int -- how many pixels wide should we draw those dots. 2 - 4 is usually good
  • fillColor = hex/bool -- a hex value to color in underneath the line, or false to disable [recommened]
  • lineColor = hex -- what color should the line be
  • defaultPixelsPerValue = int -- how many pixels between values

Requires: 2.7 or higher
Compatible up to: 2.8.6
Last Updated: 2009-11-20
Downloads: 946

Ratings

3 stars
3 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1