\ChartMancer

The ChartMancer class automates the generation of graphs based on data provided in an array.

It utilizes the GD library to create visually appealing charts, allowing developers to easily
visualize and display data trends. With ChartMancer, you can customize various aspects of the
graph, such as colors, labels, and other chart properties, providing a versatile tool
for data representation in PHP applications.

Synopsis

class ChartMancer {
}

Members

protected

  • $axisColor — array
    Contains default axis color RGB decimal values.
  • $backGroundColor — array
    Contains default background color RGB decimal values. White by default.
  • $backgroundTransparentbool
    Transparent background transparency flag
  • $barAutoWidthbool
    Bar automatic width modifier depend on data set size
  • $barWidth — int
    Bar default width in px
  • $baseColor — array
    Contains default base color RGB decimal values
  • $chartLegend — array
    Contains optional chart legend
  • $chartTitle — string
    Custom chart chart title
  • $cutSuffix — string
    Contains cutted string suffix
  • $debugbool
    Rendering debug flag
  • $displayPeakValuebool
    Render maximum dataset value on chart?
  • $drawFirstColumnAlwaysbool
    Prevents first (totals) data column from marking as already drawn
  • $font — string
    TTF font path
  • $fontSize — int
    Font size in pt.
  • $gridColor — array
    Contains default grid color RGB decimal values.
  • $gridLeft — int
    Grid dimensions and placement within chart, left side, px
  • $gridTop — int
    Grid dimensions and placement within chart, top side, px
  • $imageHeight — int
    Image dimensions, height in px
  • $imageWidth — int
    Image dimensions, width in px
  • $labelMargin — int
    Margin between label and axis in px
  • $lineWidth — int
    Grid line width in px
  • $overrideColors — array
    Dynamic palette overrides
  • $palette — string
    Custom colors palette modifier
  • $textColor — array
    Contains default text color RGB decimal values.
  • $xAxisLabelCount — int
    Contains X-axis labels count
  • $xLabelLen — int
    Maximum length of x-Axis label text
  • $xLabelRenderbool
    X-Axis text labels rendering flag
  • $yAxisName — string
    Contains custom Y-axis label
  • $yLabelRenderbool
    Y-Axis text labels rendering flag
  • $yMaxValueRatio — float
    Contains y-max ratio offset from max dataset value to upper grid limit

Methods

protected

  • checkColor() — Checks is array contains valid RGB values or not?
  • getColorFromText() — Returns a decimal RGB color based on text string as array(r/g/b)

public