Interface for all chart-engines.

Concrete instances may be returned by GraphFactory.
This interface defines only the least subset of methods, so each implementation may
provide additional methods.


interface GraphInterface {



  • addBarChartSet() — Used to create a bar-chart.
  • addLinePlot() — Registers a new plot to the current graph. Works in line-plot-mode only.
  • addStackedBarChartSet() — Used to create a stacked bar-chart.
  • createPieChart() — Creates a new pie-chart. Pass the values as the first param. If you want to use a legend and / or Colors use the second and third param.
  • renderGraph() — Common way to get a chart. The engine should save the chart to the filesystem (if required) and returns the chart with a complete code to embed the chart into a html-page.
  • saveGraph() — Does the magic. Creates all necessary stuff and finally saves the graph to the specified filename <b>Please note that not all chart-engines support this method.</b>
  • setArrSeriesColors() — Setter for setting custom series colors.
  • setArrXAxisTickLabels() — Set the labels to be used for the x-axis.
  • setBitRenderLegend() — Sets if to render a legend or not
  • setIntHeight() — Set the total height of the chart
  • setIntWidth() — Set the total width of the chart
  • setIntXAxisAngle() — Sets the angle to be used for rendering the x-axis lables
  • setStrBackgroundColor() — Set the color of the margin-areas, so the color of the area not being the plot-area.
  • setStrFont() — Set the font to be used in the chart
  • setStrFontColor() — Set the color of the fonts used in the chart
  • setStrGraphTitle() — Set the title of the graph
  • setStrXAxisTitle() — Set the title of the x-axis
  • setStrYAxisTitle() — Set the title of the y-axis
  • showGraph() — Does the magic. Creates all necessary stuff and finally sends the graph directly (!!!) to the browser.