Peity ADDONSimple and lightweight miniature chart.

EXPENSES $47,000
1,4,3,6,5,3,9,6,5,9,7
MY PROFITS $38,500
1,4,3,6,5,3,9,6,5,9,7
About

Peity (sounds like deity) is a jQuery plugin that converts an element's content into a svgmini pie donut line or bar chart and is compatible with any browser that supports svg. Peity chart is only 4kb, which makes it great to create fast lightweight charts with minimum effort.

Find tutorials, guidelines and more on Peity's official documentation

Line Chart

You can specify the width of the strokes using strokeWidthinside data-peityattribute
5,3,9,6,5,9,7,3,5,2
0,-3,-6,-4,-5,-4,-7,-3,-5,-2
0,1,7,6,4,2,3,5,3,4
5,3,9,6,5,3,1,7,6,4

Area Chart

Example of line with filling. You can add fill by using inserting data-peity='{ "fill": "#1dc9b7" }'
5,3,2,-1,-3,-2,2,3,5,2
1,4,4,7,5,9,10,4,4,7,5,9,10
5,3,9,6,5,3,1,7,6,4,4,1,5
0,1,7,6,4,2,3,5,3,4,3,1,4,6

Bar Chart

Bar charts can have positive or negative integers. You can change the bar colors via the following data-peity='{ "fill": ["#7a59ad","#886ab5","#967bbd","#a38cc6"] }'
5,3,9,6,5,9,7,3,5,2
4,-3,-6,-4,-5,-4,7,-3,-5,2
0,1,7,6,4,2,3,5,3,4
0,-1,-7,-6,-4,-2,-3,-5,-3,-4

Pie Chart

Pie charts can have any values. You can change the colors via the following data-peity='{ "fill": ["#7a59ad","#886ab5","#967bbd","#a38cc6"] }'
1/4
7,6,3,4
5/10
2,3,4,7,9,10,5,6

Donut Chart

Donut charts can have any values. You can change the colors via the following data-peity='{ "fill": ["#7a59ad","#886ab5","#967bbd","#a38cc6"] }'
1/3
10,4,4,6
5/10
2,3,4,7,9,10,5,6

Updating Chart

The following chart is updated using a small jquery snippet where it generates a random number and then is pushed into the following chart below every 1/2 second
5,3,9,6,5,9,7,3,5,2,5,3,9,6,5,9,7,3,5,2

Dynamic Colors

Colors, sizes and different settings of the chart can be generated dynamically $(".bar-colours-2").peity("bar", { fill: [value], height: value, ect... }
5,3,2,-1,-3,-2,2,3,5,2
5,3,9,6,5,9,7,3,5,2

Chart Sizes

Since the chart is just a generated SVG file, you can potentially generate the chart to any sizes using the values innerRadiusand radiusfor pie and donut charts, and widthand heightfor other charts
1/72/73/74/75/76/77/7