| Type | Description |
|---|---|
| Pie | Create a pie chart. Use the value 'pie' without quotes. |
| Line | Create a line chart. Use the value 'line' without quotes.
|
| Bar | Create a bar chart. Use the value 'bar' without quotes. |
| Bar (Stacked) | Create a bar chart. Use the value 'bar' without quotes. Use stacked: true as one of the options |
| String | Values (bold values are default) | Description | ||
|---|---|---|---|---|
| target | unique_identifier |
If you do not want to have your chart replace your table, you will need to create an html element (div or span) which has a unique id as an attribute. You can
specify where the chart would pop up by naming the unique identifier. e.g.
<table id="unique_identifier1">
<tr> <td> </td> </tr> </table> <div id="unique_identifier2"></div> // Your target would be unique_identifier2 <script> var t = umaniac_createGraph; t.init('unique_identifier1', 'line', { target: 'unique_identifier2' } ); </script> |
||
| third | true, false | Create a 3D or 2D pie chart Only available for pie charts. |
||
| color | yellow, light blue, green, dark blue, red | Use a particular range of colors that you want to use in your chart. | ||
| col_defined | integer separated by commas. e.g. '1,2,3,5' | If we only want to populate certain columns in a chart, we would define the columns here. This would/should not include the index. Examples on this page should help you understand it a little bit more. | ||
| row_defined | integer separated by commas. e.g. '1,2,3,5' | If we only want to populate certain rows in a chart, we would define the rows here. This would/should not include the index. Examples on this page should help you understand it a little bit more. | ||
| label | true, false | If set to true show the labels on a chart or |
||
| width | int | Set the width of the table. Please read the Google docs to see what size restrictions the charts have. If you're not sure, leave it blank, and we'll try to match the div to the largest size possible | ||
| height | int | Set the width of the table. Please read the Google docs to see what size restrictions the charts have. If you're not sure, leave it blank, and we'll try to match the div to the largest size possible | ||
| stacked | true, false |
If you're creating a bar chart, and want it stacked, set it to true. e.g. t.init('id' , 'bar' { stacked: true }); |
||
| vertical | true, false |
Applies to bar charts only. If you want to set your charts to a vertical alignment, set it to true. e.g. t.init('id' , 'bar' { vertical: true }); |
||
| row_index | int, default is 0 | If your labels/legend do not lie on the first row, then you can define it here. Keep in mind, that the rest of the data will be below this row. | ||
| col_index | int, default is 0 | If your labels/legend do not lie on the first column, then you can define it here. Keep in mind, that the rest of the data will be on the right of this column. | ||
| spread_graph | true, false |
By default, a small number of items would lead to a smaller chart being created, even if the canvas is spread out. Google Charts does allow you to spread out the charts to take advantage of the entire canvas. By default, this is set to true, so that the labels don't end up on top of each other. Enter in the value false if you don't want the graph to spread out.
e.g. t.init('id' , 'bar' { spread_graph: false }); Warning: Google Charts does not care if some of your charts fall off the canvas. Use the value "false" if you're sure that you know your data will show up.
|