These options should be set with
Parameters:
Examples:
1. Using array:
$chart = new jqChart(); $chart->setChartOptions(array("defaultSeriesType"=>"line","marginRight"=>130)); ...
2.The same using name value
$chart = new jqChart(); $chart->setChartOptions("defaultSeriesType","line") ->setChartOptions("marginRight",130); ...
Option name | Type | Default |
---|---|---|
alignTicks | Boolean | true |
When using multiple axis, the ticks of two or more opposite axes will automatically be aligned by adding ticks to the axis or axes with the least ticks. This can be prevented by setting alignTicks to false. If the grid lines look messy, it's a good idea to hide them for the secondary axis by setting gridLineWidth to 0. Defaults to true. | ||
animation | Boolean|Array | true |
Set the overall animation for all chart updating. Animation can be disabled throughout the chart by setting it to false here. It can be overridden for each individual API method as a function parameter. The only animation not affected by this option is the initial series animation, see plotOptions.series => animation.
The animation can either be set as a boolean or a configuration object. If true, it will use the 'swing' jQuery easing and a duration of 500 ms. If used as a configuration object, the following properties are supported: duration The duration of the animation in milliseconds. easing The easing can be set to linear or swing. More easing functions are available with the use of jQuery plug-ins, most notably the jQuery UI suite. See the jQuery docs. |
||
backgroundColor | Color | "#FFFFFF" |
The background color or gradient for the outer chart area. Defaults to "#FFFFFF". Defaults to "#FFFFFF". | ||
borderColor | Color | "#4572A7" |
The color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners. Defaults to "#4572A7". Defaults to "#4572A7". | ||
borderRadius | Number | 5 |
The corner radius of the outer chart border. | ||
borderWidth | Number | 0 |
The pixel width of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners. | ||
className | String | "" |
A CSS class name to apply to the charts container div, allowing unique CSS styling for each chart. Defaults to "". | ||
defaultSeriesType | String | |
Alias of type. See below | ||
height | Number | null |
An explicit height for the chart. By default the height is calculated from the offset height of the containing element. | ||
ignoreHiddenSeries | Boolean | true |
If true, the axes will scale to the remaining visible series once one series is hidden. If false, hiding and showing a series will not affect the axes or the other series. For stacks, once one series within the stack is hidden, the rest of the stack will close in around it even if the axis is not affected. Defaults to true. | ||
inverted | Boolean | false |
Whether to invert the axes so that the x axis is horizontal and y axis is vertical. When true, the x axis is reversed by default. If a bar plot is present in the chart, it will be inverted automatically. Defaults to false. | ||
margin | Array | null |
The margin between the outer edge of the chart and the plot area. The numbers in the array designate top, right, bottom and left respectively. Use the options marginTop, marginRight, marginBottom and marginLeft for shorthand setting of one option.
The margin is 0 by default. The actual space is dynamically calculated from the offset of axis labels, axis title, title, subtitle and legend in addition to the spacingTop, spacingRight, spacingBottom and spacingLeft options. |
||
marginTop | Number | null |
The margin between the top outer edge of the chart and the plot area. Use this to set a fixed pixel value for the margin as opposed to the default dynamic margin. See also spacingTop. Defaults to null. | ||
marginRight | Number | 50 |
The margin between the right outer edge of the chart and the plot area. Use this to set a fixed pixel value for the margin as opposed to the default dynamic margin. See also spacingRight. | ||
marginBottom | Number | 70 |
The margin between the bottom outer edge of the chart and the plot area. Use this to set a fixed pixel value for the margin as opposed to the default dynamic margin. See also spacingBottom. | ||
marginLeft | Number | 80 |
The margin between the left outer edge of the chart and the plot area. Use this to set a fixed pixel value for the margin as opposed to the default dynamic margin. See also spacingLeft. | ||
plotBackgroundColor | Color | null |
The background color or gradient for the plot area. | ||
plotBackgroundImage | String | null |
The URL for an image to use as the plot background. To set an image as the background for the entire chart, set a CSS background image to the container element. | ||
plotBorderColor | Color | "#C0C0C0" |
The color of the inner chart or plot area border. | ||
plotBorderWidth | Number | 0 |
The pixel width of the plot area border. | ||
plotShadow | Boolean | false |
Whether to apply a drop shadow to the plot area. Requires that plotBackgroundColor be set. | ||
reflow | Boolean | true |
Whether to reflow the chart to fit the width of the container div on resizing the window. | ||
shadow | Boolean | False |
Whether to apply a drop shadow to the outer chart area. Requires that backgroundColor be set. | ||
showAxes | Boolean | false |
Whether to show the axes initially. This only applies to empty charts where series are added dynamically, as axes are automatically added to cartesian series. | ||
spacingTop | Number | 10 |
The space between the top edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position). | ||
spacingRight | Number | 10 |
The space between the right edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position). | ||
spacingBottom | Number | 15 |
The space between the bottom edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position). | ||
spacingLeft | Number | 10 |
The space between the left edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position). | ||
style | Array | |
Additional CSS styles to apply inline to the container div. Defaults to:
array( "fontFamily"=> '"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif', // default font "fontSize=> '12px' ) |
||
type | String | "line" |
The default series type for the chart. Can be one of line, spline, area, areaspline, column, bar, pie and scatter. Defaults to "line". | ||
width | Number | null |
An explicit width for the chart. By default the width is calculated from the offset width of the containing element. | ||
zoomType | String | "" |
Decides in what dimentions the user can zoom by dragging the mouse. Can be one of x, y or xy. Defaults to "". |