grid – PHP Charts & Graphs https://phpchart.com Making charts in PHP is simple again. Tue, 13 Dec 2011 01:13:42 +0000 en-US hourly 1 https://wordpress.org/?v=5.8.13 Set PHP Chart Grid Properties https://phpchart.com/examples/set-php-chart-grid-properties/ https://phpchart.com/examples/set-php-chart-grid-properties/#respond Sat, 26 Nov 2011 02:48:25 +0000 http://phpchart.net/?p=315 We will now start diving deeper into the phpChart. We will go over some of the main functions used for specifying properties in different phpChart object. For detailed technical instructions, please take a look at the documentation section of the web page. Grid – Object representing the grid on which the plot is drawn Axis […]

The post Set PHP Chart Grid Properties appeared first on PHP Charts & Graphs.

]]>
We will now start diving deeper into the phpChart. We will go over some of the main functions used for specifying properties in different phpChart object. For detailed technical instructions, please take a look at the documentation section of the web page.

  • Grid – Object representing the grid on which the plot is drawn
  • Axis – An individual axis object
  • Legend – Chart legend object
  • Title – Chart title object
  • Series – An individual data series object representing a series of data on the chart

Let’s start out an example with the grid object, which is object representing the grid on which the plot is drawn.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$pc = new C_PhpChartX(array(array(11, 9, 5, 12, 14)),'basic_chart');
$pc->set_animate(true);
$pc->set_title(array('text'=>'Basic Chart'));

$pc->set_series_default(array(
    'renderer'=>'plugin::BarRenderer',
    'rendererOptions'=>array('sliceMargin'=>2,'innerDiameter'=>110,'startAngle'=>-90,'highlightMouseDown'=>true),
    'shadow'=>true
    ));

$pc->add_plugins(array('highlighter'));

//set phpChart grid properties
$pc->set_grid(array(
    'background'=>'lightyellow',
    'borderWidth'=>0,
    'borderColor'=>'#000000',
    'shadow'=>true,
    'shadowWidth'=>10,
    'shadowOffset'=>3,
    'shadowDepth'=>3,
    'shadowColor'=>'rgba(230, 230, 230, 0.07)'
    ));

$pc->draw();

Live demo

Complete Grid reference: http://www.jqplot.com/docs/files/jqplot-core-js.html#Grid

The post Set PHP Chart Grid Properties appeared first on PHP Charts & Graphs.

]]>
https://phpchart.com/examples/set-php-chart-grid-properties/feed/ 0