Documentation Home
Examples
Pie Charts
Overview
Customizing the chart
Function Reference
Examples
Line & Bar Graphs
Overview
Adding data
Customizing the bars
Customizing the axes
Function Reference
Support
Installation
Version History
Technical Support
Previous: bar_example1.example.phpNext: bar_column_spacing5.example.php

Example Chart: bar_axis_negative5.example.php

<?php
  include( 'chartlogix.inc.php' );
 
  $chart = new BarChart();
  $chart->setLegendWidth( 0 );
 
  $chart->setXAxisTitleStyle( 'arial.ttf', 20, 'CC0000' );
  $chart->setYAxisTitleStyle( 'arial.ttf', 20, '0000FF' );
 
  $chart->setLeftAxisTitle( 'Profits' );
  $chart->setBottomAxisTitle( 'Month (2010)' );
 
  $chart->doBarSeries( 'Profits', 'FFCC00' );
  $chart->addData( 'Jan', 127 );
  $chart->addData( 'Feb', -324 );
  $chart->addData( 'Mar', -170 );
  $chart->addData( 'Apr', 196 );
  $chart->addData( 'May', 391 );
  $chart->addData( 'Jun', 650 );
  $chart->addData( 'Jul', -23 );
  $chart->addData( 'Aug', 109 );
 
  $chart->setValueStyle( 'arial.ttf', 10, '000000', 1, 90 );
 
  $chart->drawPNG( 500, 400 );
Home  |  Online Store  |  Documentation  |  ChartLogix Features  |  Terms & Conditions Copyright © 2024 CubeLogix Ltd