- Ensure a donut's default inner radius honours percentage dimensions by deriving it from its calculated radius.
- Bring back per-chart reading settings from data attributes but with a slightly different interface: all settings are stored on the
data-peity
attribute as JSON.
- Don't allow negative or zero values to blow up a pie chart.
- Fix
max
/min
option when it's a string.
- jQuery > 1.6.2 doesn’t like
undefined
being passed to#attr()
.
- Remove the ability to read options from data attributes.
- Add donut chart type.
- Switch from
diameter
pie chart option toradius
. - Expose the internally-used scale functions to the outside world.
- Rename
gap
bar chart option topadding
. It is now specified as a portion of the width of each bar and is present on both sides.
- Changes to make the minified version 147 bytes smaller!
- Fix a null max argument being calculated as zero when all values are negative.
- Ensure that a null min argument means that the minimum is calculated from a chart’s values.
- Don't blow up drawing a line chart of all zeros.
- Fix misaligned bar when its value is negative and equal to the minimum.
- Ensure bars are positioned correctly when a bar chart's values are all equal its minimum value.
- Switch from
<canvas>
to<svg>
. - Update jQuery dependency from 1.4.4 to 1.6.2 due to problems fetching a
<svg>
element's dimensions in Firefox. - Rename
colour
/colours
options tofill
. - Rename
spacing
bar chart option togap
. - Rename
strokeColour
line chart option tostroke
.
- Ensure a line chart's outline doesn't spill off the canvas.
- Easier CSS targeting of Peity-created canvas elements.
- Percentage dimensions (
width: "100%"
) now work.
- Fix reference to
devicePixelRatio
- thanks @kcivey.
- component.json for Bower.
- Finally in the jQuery plugin registry: http://plugins.jquery.com/peity/
- Multiple calls to
peity()
on the same element now update the existing chart rather than creating a new one. - Zero values in a bar chart are now present as a single-pixel bar.
- Spacing between bars can now be configured.
- Pie charts can now be formed of more than 2 segments.
- The colours of bar and pie charts can now be set dynamically based on their value.
- Re-write of the internals so that the actual
<canvas>
element is only created once and$.wrapInner
is no longer used to contain everything in a separate<span>
. - Peity now automatically reads data-* attributes and passes them as options when instantiating a chart. @buunguyen
- Workaround for Linux/Chrome bug when using #arc to draw a full circle not having a zero starting angle.
- Line and bar charts now support negative numbers.
- Fix - rename radius to diameter.
- Allow line charts with no stroke.
- Support for iPhone 4 retina display.
- For a line graph with a single value show a straight line instead of nothing.
- Allow options to be passed a function called with a
this
value of the element in question.
- Fix that if the numerator of a pie is zero an empty pie is drawn instead of nothing. @munikho
- Remove the little border that appears around the slice of a pie when the slice has a darker colour than the plate. @munikho
- Tweaks to aid minification.
- Don't blow up if
<canvas>
isn't supported.
- Add "strokeWidth" option to line charts.
- Add "max" option to line and bar chart types.
- Add line and bar graph types and expose an interface for adding more. @ismasan and me.
First official version. Thanks to @ismasan and @olivernn for adding support for the "change" event and making it work in Firefox respectively.
It works!