org.richfaces.renderkit

## Class ChartRendererBase

- java.lang.Object
- - javax.faces.render.Renderer
  - - org.richfaces.renderkit.RendererBase
    - - org.richfaces.renderkit.ChartRendererBase

- Direct Known Subclasses:
    ChartRenderer

      public abstract class ChartRendererBase
      extends RendererBase

  Author:
    Lukas Macko

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `RENDERER_TYPE`

    - ### Fields inherited from class javax.faces.render.Renderer

      `PASSTHROUGH_RENDERER_LOCALNAME_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChartRendererBase()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JSONObject` | `addAttribute(JSONObject obj, String key, Object value)` Method adds key-value pair to object.
    `String` | `axisDataTypeToString(Class c)` Converts class name of data type used in axes to shorter string representation ie.
    `void` | `doDecode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Template method for custom decoding of concrete renderer.
    `void` | `doEncodeBegin(javax.faces.context.ResponseWriter writer, javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Method process chart tags, it collects chart options and data.
    `JSONArray` | `getChartData(javax.faces.context.FacesContext ctx, javax.faces.component.UIComponent component)` Returns chart chart data
    `String` | `getFieldId(javax.faces.component.UIComponent component, String attribute)` Method creates unique identifier for request parameter.
    `JSONObject` | `getOpts(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Method creates JSON containing chart options
    `JSONObject` | `getParticularSeriesHandler(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`

    - ### Methods inherited from class org.richfaces.renderkit.RendererBase

      `concatClasses, concatStyles, decode, doEncodeChildren, doEncodeEnd, encodeBegin, encodeChildren, encodeEnd, getComponentClass, getResourcePath, getSkin, getUtils, isAlreadyRendered, preDecode, preEncodeBegin, queueComponentEventForBehaviorEvent, renderChildren`

    - ### Methods inherited from class javax.faces.render.Renderer

      `convertClientId, getConvertedValue, getRendersChildren`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### RENDERER_TYPE

          public static final String RENDERER_TYPE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ChartRendererBase

          public ChartRendererBase()

  - ### Method Detail

    - #### addAttribute

          public static JSONObject addAttribute(JSONObject obj,
                                String key,
                                Object value)
                                         throws IOException

      Method adds key-value pair to object.
      Parameters:
        `obj` -
        `key` -
        `value` -
      Returns:
      Throws:
        `IOException` - if put to JSONObject fails

    - #### getOpts

          public JSONObject getOpts(javax.faces.context.FacesContext context,
                           javax.faces.component.UIComponent component)
                             throws IOException

      Method creates JSON containing chart options
      Parameters:
        `context` -
        `component` -
      Returns:
      Throws:
        `IOException`

    - #### doDecode

          public void doDecode(javax.faces.context.FacesContext context,
                      javax.faces.component.UIComponent component)

      Description copied from class: `RendererBase`
      Template method for custom decoding of concrete renderer. All parameters checking if performed in original `RendererBase.decode(FacesContext, UIComponent)` method.
      Overrides:
        `doDecode` in class `RendererBase`

    - #### getChartData

          public JSONArray getChartData(javax.faces.context.FacesContext ctx,
                               javax.faces.component.UIComponent component)

      Returns chart chart data
      Parameters:
        `ctx` -
        `component` -
      Returns:

    - #### doEncodeBegin

          public void doEncodeBegin(javax.faces.context.ResponseWriter writer,
                           javax.faces.context.FacesContext context,
                           javax.faces.component.UIComponent component)
                             throws IOException

      Method process chart tags, it collects chart options and data.
      Overrides:
        `doEncodeBegin` in class `RendererBase`
      Throws:
        `IOException`

    - #### axisDataTypeToString

          public String axisDataTypeToString(Class c)

      Converts class name of data type used in axes to shorter string representation ie. class java.lang.String -> string
      Parameters:
        `c` -
      Returns:

    - #### getParticularSeriesHandler

          public JSONObject getParticularSeriesHandler(javax.faces.context.FacesContext context,
                                              javax.faces.component.UIComponent component)

    - #### getFieldId

          public String getFieldId(javax.faces.component.UIComponent component,
                          String attribute)

      Method creates unique identifier for request parameter.
      Parameters:
        `component` -
        `attribute` -
      Returns:

Copyright © 2014 JBoss by Red Hat. All Rights Reserved.