diff --git a/docs/reference.html b/docs/reference.html index 8d9ac24..5b2b35c 100644 --- a/docs/reference.html +++ b/docs/reference.html @@ -1,6 +1,6 @@ -g.Raphaël Reference
  1. Element
  2. Element.blob()
  3. Element.darker()
  4. Element.drop()
  5. Element.flag()
  6. Element.label()
  7. Element.lighter()
  8. Element.popup()
  9. Element.resetBrightness()
  10. Element.tag()
  11. Paper
  12. Paper.blob()
  13. Paper.dotchart()
  14. Paper.drop()
  15. Paper.flag()
  16. Paper.label()
  17. Paper.linechart()
  18. Paper.popup()
  19. Paper.tag()
  20. dotchart
  21. dotchart.axis
  22. dotchart.click()
  23. dotchart.covers
  24. dotchart.each()
  25. dotchart.hover()
  26. dotchart.href()
  27. dotchart.series
  28. g
  29. g.colors
  30. g.shim
  31. g.txtattr
  32. linechart
  33. linechart.axis
  34. linechart.click()
  35. linechart.clickColumn()
  36. linechart.each()
  37. linechart.eachColumn()
  38. linechart.hover()
  39. linechart.hoverColumn()
  40. linechart.hrefColumn()
  41. linechart.lines
  42. linechart.shades
  43. linechart.symbols

g.Raphaël Reference

 Element

+g.Raphaël Reference
  1. Element
  2. Element.blob()
  3. Element.darker()
  4. Element.drop()
  5. Element.flag()
  6. Element.label()
  7. Element.lighter()
  8. Element.popup()
  9. Element.resetBrightness()
  10. Element.tag()
  11. Paper
  12. Paper.barchart()
  13. Paper.blob()
  14. Paper.dotchart()
  15. Paper.drop()
  16. Paper.flag()
  17. Paper.label()
  18. Paper.linechart()
  19. Paper.piechart()
  20. Paper.popup()
  21. Paper.tag()
  22. Paper.vbarchart()
  23. dotchart
  24. dotchart.axis
  25. dotchart.click()
  26. dotchart.covers
  27. dotchart.each()
  28. dotchart.hover()
  29. dotchart.href()
  30. dotchart.series
  31. g
  32. g.colors
  33. g.shim
  34. g.txtattr
  35. linechart
  36. linechart.axis
  37. linechart.click()
  38. linechart.clickColumn()
  39. linechart.each()
  40. linechart.eachColumn()
  41. linechart.hover()
  42. linechart.hoverColumn()
  43. linechart.hrefColumn()
  44. linechart.lines
  45. linechart.shades
  46. linechart.symbols

g.Raphaël Reference

 Element

 Element.blob(angle, x, y)

Puts the context Element in a 'blob' tooltip. Can also be used on sets.

@@ -182,7 +182,43 @@ }).tag(60);

 Paper

-

 Paper.blob(x, y, text, angle)

+

 Paper.barchart(x, y, width, height, values, opts)

+

Creates a horizontal bar chart +

+

Parameters +

+
x
+
number
+
x coordinate of the chart
+
y
+
number
+
y coordinate of the chart
+
width
+
number
+
width of the chart (respected by all elements in the set)
+
height
+
number
+
height of the chart (respected by all elements in the set)
+
values
+
array
+
values
+
opts
+
object
+
options for the chart
+
+
  1. {
    1. typestringtype of endings of the bar. Default: 'square'. Other options are: 'round', 'sharp', 'soft'. +
    2. gutternumber(string) default '20%' (WHAT DOES IT DO?) +
    3. vgutternumber  +
    4. colorsarraycolors be used repeatedly to plot the bars. If multicolumn bar is used each sequence of bars with use a different color. +
    5. stackedbooleanwhether or not to tread values as in a stacked bar chart +
    6. to
    7. stretchboolean  +
  2. }
+

Returns: object path element of the popup

+

Usage +

+
r.barchart(0, 0, 620, 260, [76, 70, 67, 71, 69], {})
+
+

 Paper.blob(x, y, text, angle)

Puts the given text into a 'blob' tooltip. The text is given a default style according to g.txtattr. See Element.blob

Parameters @@ -367,6 +403,43 @@

r.linechart(0, 0, 99, 99, [1,2,3,4,5], [[1,2,3,4,5], [1,3,9,16,25], [100,50,25,12,6]], {smooth: true, colors: ['#F00', '#0F0', '#FF0'], symbol: 'circle'});
 
+

 Paper.piechart(cx, cy, r, values, opts)

+

Creates a pie chart +

+

Parameters +

+
cx
+
number
+
x coordinate of the chart
+
cy
+
number
+
y coordinate of the chart
+
r
+
integer
+
radius of the chart
+
values
+
array
+
values used to plot
+
opts
+
object
+
options for the chart
+
+
  1. {
    1. strokestringcolor of the circle stroke in HTML color format [default "#FFF"] +
    2. strokewidthintegerwidth of the chart stroke [default 1] +
    3. initbooleanwhether or not to show animation when the chart is ready [default false] +
    4. colorsarraycolors be used to plot the chart +
    5. hrefarrayurls to to set up clicks on chart slices +
    6. legendarrayarray containing strings that will be used in a legend. Other label options work if legend is defined. +
    7. legendcolorstringcolor of text in legend [default "#000"] +
    8. legendothersstringtext that will be used in legend to describe options that are collapsed into 1 slice, because they are too small to render [default "Others"] +
    9. legendmarkstringsymbol used as a bullet point in legend that has the same colour as the chart slice [default "circle"] +
    10. legendposstringposition of the legend on the chart [default "east"]. Other options are "north", "south", "west" +
  2. }
+

Returns: object path element of the popup

+

Usage +

+
r.piechart(cx, cy, r, values, opts)
+

 Paper.popup(x, y, text, dir, size)

Puts the given text into a 'popup' tooltip. The text is given a default style according to g.txtattr. See Element.popup

@@ -421,6 +494,42 @@

paper.tag(50, 50, "$9.99", 60);
 
+

 Paper.vbarchart(x, y, width, height, values, opts)

+

Creates a vertical bar chart +

+

Parameters +

+
x
+
number
+
x coordinate of the chart
+
y
+
number
+
y coordinate of the chart
+
width
+
number
+
width of the chart (respected by all elements in the set)
+
height
+
number
+
height of the chart (respected by all elements in the set)
+
values
+
array
+
values
+
opts
+
object
+
options for the chart
+
+
  1. {
    1. typestringtype of endings of the bar. Default: 'square'. Other options are: 'round', 'sharp', 'soft'. +
    2. gutternumber(string) default '20%' (WHAT DOES IT DO?) +
    3. vgutternumber  +
    4. colorsarraycolors be used repeatedly to plot the bars. If multicolumn bar is used each sequence of bars with use a different color. +
    5. stackedbooleanwhether or not to tread values as in a stacked bar chart +
    6. to
    7. stretchboolean  +
  2. }
+

Returns: object path element of the popup

+

Usage +

+
r.vbarchart(0, 0, 620, 260, [76, 70, 67, 71, 69], {})
+

 dotchart

 dotchart.axis

Set containing Elements of the chart axis. Only exists if 'axis' definition string was passed to Paper.dotchart @@ -620,7 +729,9 @@

- + + + \ No newline at end of file diff --git a/g.bar.js b/g.bar.js index b1554a3..9f72387 100644 --- a/g.bar.js +++ b/g.bar.js @@ -135,9 +135,6 @@ } } - /* - * vbarchart method on paper - */ /*\ * Paper.vbarchart [ method ] @@ -152,13 +149,15 @@ - height (number) height of the chart (respected by all elements in the set) - values (array) values - opts (object) options for the chart - - type (string) type of endings of the bar. Default: 'square'. Other options are: 'round', 'sharp', 'soft'. - - gutter (number)(string) default '20%' (WHAT DOES IT DO?) - - vgutter (number) - - colors (array) colors be used repeatedly to plot the bars. If multicolumn bar is used each sequence of bars with use a different color. - - stacked (boolean) whether or not to tread values as in a stacked bar chart - - to - - stretch (boolean) + o { + o type (string) type of endings of the bar. Default: 'square'. Other options are: 'round', 'sharp', 'soft'. + o gutter (number)(string) default '20%' (WHAT DOES IT DO?) + o vgutter (number) + o colors (array) colors be used repeatedly to plot the bars. If multicolumn bar is used each sequence of bars with use a different color. + o stacked (boolean) whether or not to tread values as in a stacked bar chart + o to + o stretch (boolean) + o } ** = (object) path element of the popup > Usage @@ -424,9 +423,6 @@ return new VBarchart(this, x, y, width, height, values, opts); }; - /* - * barchart method on paper - */ /*\ * Paper.barchart [ method ] @@ -441,13 +437,15 @@ - height (number) height of the chart (respected by all elements in the set) - values (array) values - opts (object) options for the chart - - type (string) type of endings of the bar. Default: 'square'. Other options are: 'round', 'sharp', 'soft'. - - gutter (number)(string) default '20%' (WHAT DOES IT DO?) - - vgutter (number) - - colors (array) colors be used repeatedly to plot the bars. If multicolumn bar is used each sequence of bars with use a different color. - - stacked (boolean) whether or not to tread values as in a stacked bar chart - - to - - stretch (boolean) + o { + o type (string) type of endings of the bar. Default: 'square'. Other options are: 'round', 'sharp', 'soft'. + o gutter (number)(string) default '20%' (WHAT DOES IT DO?) + o vgutter (number) + o colors (array) colors be used repeatedly to plot the bars. If multicolumn bar is used each sequence of bars with use a different color. + o stacked (boolean) whether or not to tread values as in a stacked bar chart + o to + o stretch (boolean) + o } ** = (object) path element of the popup > Usage diff --git a/g.pie.js b/g.pie.js index aa7704a..116aece 100644 --- a/g.pie.js +++ b/g.pie.js @@ -18,19 +18,21 @@ ** - cx (number) x coordinate of the chart - cy (number) y coordinate of the chart - - r + - r (integer) radius of the chart - values (array) values used to plot - opts (object) options for the chart - - stroke - - strokewidth - - init - - colors (array) - - href (array) - - legend - - legendcolor - - legendothers - - legendmark - - legendpos + o { + o stroke (string) color of the circle stroke in HTML color format [default `"#FFF"`] + o strokewidth (integer) width of the chart stroke [default `1`] + o init (boolean) whether or not to show animation when the chart is ready [default `false`] + o colors (array) colors be used to plot the chart + o href (array) urls to to set up clicks on chart slices + o legend (array) array containing strings that will be used in a legend. Other label options work if legend is defined. + o legendcolor (string) color of text in legend [default `"#000"`] + o legendothers (string) text that will be used in legend to describe options that are collapsed into 1 slice, because they are too small to render [default `"Others"`] + o legendmark (string) symbol used as a bullet point in legend that has the same colour as the chart slice [default `"circle"`] + o legendpos (string) position of the legend on the chart [default `"east"`]. Other options are `"north"`, `"south"`, `"west"` + o } ** = (object) path element of the popup > Usage diff --git a/g.raphael.json b/g.raphael.json index 1a733c4..486dc3d 100644 --- a/g.raphael.json +++ b/g.raphael.json @@ -1,7 +1,7 @@ { "title": "g.Raphaël", "output": "../g.raphael/docs/reference.html", - "scripts": ["../raphael-min.js", "../g.raphael.js", "../g.dot.js", "../g.line.js", "reference.js"], + "scripts": ["../raphael-min.js", "../g.raphael.js", "../g.line.js", "../g.dot.js", "../g.bar.js", "../g.pie.js", "reference.js"], "files": [{ "url": "../g.raphael/g.raphael.js", "link": "https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js" @@ -11,5 +11,12 @@ },{ "url": "../g.raphael/g.dot.js", "link": "https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.dot.js" + },{ + "url": "../g.raphael/g.bar.js", + "link": "https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.bar.js" + }, + { + "url": "../g.raphael/g.pie.js", + "link": "https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.pie.js" }] }