Package muntjac :: Package addon :: Package invient :: Module invient_charts_util
[hide private]
[frames] | no frames]

Module invient_charts_util

source code

Utility functions used by InvientCharts to write its state to the UIDL stream. The state includes properties of InvientCharts such as InvientChartsConfig, Series, Point and various chart events.

In general, only non-null properties/attributes of a chart are written to the UIDL stream.


Authors:
Invient, Richard Lincoln
Functions [hide private]
 
writeTitleBaseOptions(target, titleBaseOptions)
Writes configuration attributes common to chart title and subtitle.
source code
 
writeTitleConfig(target, titleOptions)
Writes configuration attributes of the chart title.
source code
 
writeSubtitleConfig(target, subtitleOptions)
Writes configuration attributes of the chart subtitle.
source code
 
writeCreditConfig(target, creditOptions)
Writes configuration attributes of the chart subtitle.
source code
 
writeLegendConfig(target, legendOptions)
Writes configuration attributes of the chart legend.
source code
 
writeTooltipConfig(target, tooltipOptions)
Writes configuration attributes of the chart tooltip.
source code
 
writeGeneralChartConfig(target, chartOptions)
Writes configuration attributes of the chart itself.
source code
 
writeSeriesConfigPerSeriesType(target, seriesOptions)
Writes configuration attributes of every series type.
source code
 
writeSeriesConfig(target, series)
Writes configuration attributes of a single series.
source code
 
writeCommonSeriesOptions(target, seriesOptions)
Writes configuration attributes common to all types of series.
source code
 
writeSeriesState(target, seriesState)
Writes configuration attributes of a series hover state.
source code
 
writeSeriesDataLabel(target, dataLabel)
Writes configuration attributes common to all types of series.
source code
 
writeDataLabel(target, dataLabel)
Writes configuration attributes of a series data labels.
source code
 
writePieDataLabel(target, dataLabel)
Writes configuration attributes of a pie chart's data label.
source code
 
writeAxisDataLabel(target, dataLabel)
Writes configuration attributes of an axis data labels.
source code
 
writeXAxisDataLabel(target, dataLabel)
Writes configuration attributes of an x-axis data labels.
source code
 
writeYAxisDataLabel(target, dataLabel)
Writes configuration attributes of y-axis data labels.
source code
 
writeMarkerOptions(target, markerOptions)
Writes configuration attributes of a marker.
source code
 
writeMarkerStates(target, marker)
Writes configuration attributes of a marker states hover and select
source code
 
writeImageMarkerOptions(target, imgMarker)
Writes configuration attributes of an image marker
source code
 
writeSymbolMarkerOptions(target, symbolMarker)
Writes configuration attributes of a symbol marker
source code
 
writeMarkerState(target, markerState)
Writes configuration attributes of a marker
source code
 
writeBaseLineOptions(target, baseLineOptions)
Writes configuration attributes common to all lines series such as line, spline and area.
source code
 
writeSplineOptions(target, splineOptions)
Writes configuration attributes of a spline series
source code
 
writeScatterOptions(target, scatterOptions)
Writes configuration attributes of s scatter series
source code
 
writeLineOptions(target, lineOptions)
Writes configuration attributes of a line series
source code
 
writeAreaOptions(target, areaOptions)
Writes configuration attributes of an area series
source code
 
writeAreaSplineOptions(target, areaSplineOptions)
Writes configuration attributes of an area-spline
source code
 
writePieOptions(target, pieOptions)
Writes configuration attributes of a pie series
source code
 
writeBaseBarOptions(target, baseBarOptions)
Writes configuration attributes common to columnar series such as bar and column
source code
 
writeBarOptions(target, barOptions)
Writes configuration attributes of a bar series
source code
 
writeColumnOptions(target, columnOptions)
Writes configuration attributes of a column series
source code
 
writeSeries(target, chartSeriesType, data, xAxes, yAxes)
Writes data of each series of the chart.
source code
 
writePoints(target, points)
Writes point data (x, y) and its configuration attributes, if any.
source code
 
writeBaseAxis(target, axis, axes)
Writes configuration attributes common to all types of axis.
source code
 
getXAxisIndex(indexOfXAxis, xAxes)
Returns an index of an x-axis in a list of x-axis only if the x-axis exists otherwise null
source code
 
getYAxisIndex(indexOfYAxis, yAxes)
Returns an index of a y-axis in a list of y-axis only if the y-axis exists otherwise null
source code
 
getAxisIndex(indexOfAxis, axes)
Returns an index of an axis in a list of axis only if the axis exists otherwise null
source code
 
writePlotBands(target, plotBands)
Writes configuration attributes of the plotbands associated with an axis.
source code
 
writePlotLabel(target, plotLabel)
Writes configuration attributes of a plotlabel.
source code
 
writePlotBandRange(target, plotBandRange)
Writes from/to value for a plotband.
source code
 
writePlotLines(target, plotLines)
Writes configuration attributes of the plotlines
source code
 
writePlotLineValue(target, plotLineValue)
Writes value of a plotline.
source code
 
writeAxisTick(target, tick) source code
 
writeAxisMinorTick(target, tick)
Writes configuration attributes of an axis.
source code
 
writeAxisGrid(target, grid) source code
 
writeAxisMinorGrid(target, grid)
Writes configuration attributes of an axis.
source code
 
writeAxisTitle(target, title) source code
 
writeXAxes(target, axes, config)
Iteratively processes each x-axis and writes configuration attributes of each axis based on type of the axis e.g.
source code
 
isIncludeTime(axis, chartSeries) source code
 
writeNumberAxis(target, numberAxis) source code
 
getDate(dt, isIncludeTime=False)
Returns milliseconds of the date argument dt.
source code
 
writeDateTimeAxis(target, dateTimeAxis, isIncludeTime)
@param target @param dateTimeAxis @raise PaintException
source code
 
writeCategoryAxis(target, categoryAxis) source code
 
writeYAxes(target, axes, config) source code
 
writeChartLabelConfig(target, chartLabel)
Writes configuration attributes of the chart labels.
source code
 
getYearFromDate(date)
Returns: Returns year of the argument date.
source code
 
getMonthFromDate(date)
Returns: Returns month of the argument date.
source code
 
getDayFromDate(date) source code
 
writeChartDataUpdates(target, seriesCURMap)
Writes information about which series were added, removed or updated.
source code
Function Details [hide private]

writeTitleBaseOptions(target, titleBaseOptions)

source code 

Writes configuration attributes common to chart title and subtitle.

@param target @param titleBaseOptions @throws PaintException

writeTitleConfig(target, titleOptions)

source code 

Writes configuration attributes of the chart title.

@param target @param titleOptions @throws PaintException

writeSubtitleConfig(target, subtitleOptions)

source code 

Writes configuration attributes of the chart subtitle. Only those attributes are written who have got non-null values.

@param target @param subtitleOptions @throws PaintException

writeCreditConfig(target, creditOptions)

source code 

Writes configuration attributes of the chart subtitle.

@param target @param creditOptions @throws PaintException

writeLegendConfig(target, legendOptions)

source code 

Writes configuration attributes of the chart legend.

@param target @param legendOptions @throws PaintException

writeTooltipConfig(target, tooltipOptions)

source code 

Writes configuration attributes of the chart tooltip.

@param target @param tooltipOptions @throws PaintException

writeGeneralChartConfig(target, chartOptions)

source code 

Writes configuration attributes of the chart itself.

@param target @param chartOptions @throws PaintException

writeSeriesConfigPerSeriesType(target, seriesOptions)

source code 

Writes configuration attributes of every series type. The series type can be one of the line, spline, scatter, area, areaspline, bar, column and pie.

@param target @param seriesOptions @throws PaintException

writeSeriesConfig(target, series)

source code 

Writes configuration attributes of a single series.

@param target @param series

Raises:

writeCommonSeriesOptions(target, seriesOptions)

source code 

Writes configuration attributes common to all types of series.

@param target @param seriesOptions @throws PaintException

writeSeriesState(target, seriesState)

source code 

Writes configuration attributes of a series hover state.

@param target @param seriesState @throws PaintException

writeSeriesDataLabel(target, dataLabel)

source code 

Writes configuration attributes common to all types of series. It takes care of specific data labels in case of pie.

@param target @param dataLabel @raise PaintException

writeDataLabel(target, dataLabel)

source code 

Writes configuration attributes of a series data labels.

@param target @param dataLabel @raise PaintException

writePieDataLabel(target, dataLabel)

source code 

Writes configuration attributes of a pie chart's data label.

@param target @param dataLabel @raise PaintException

writeAxisDataLabel(target, dataLabel)

source code 

Writes configuration attributes of an axis data labels.

@param target @param dataLabel @raise PaintException

writeXAxisDataLabel(target, dataLabel)

source code 

Writes configuration attributes of an x-axis data labels.

@param target @param dataLabel @raise PaintException

writeYAxisDataLabel(target, dataLabel)

source code 

Writes configuration attributes of y-axis data labels.

@param target @param dataLabel @raise PaintException

writeMarkerOptions(target, markerOptions)

source code 

Writes configuration attributes of a marker. It takes care of handling image or symbol marker.

@param target @param markerOptions @raise PaintException

writeMarkerStates(target, marker)

source code 

Writes configuration attributes of a marker states hover and select

@param target @param marker @raise PaintException

writeImageMarkerOptions(target, imgMarker)

source code 

Writes configuration attributes of an image marker

@param target @param imgMarker @raise PaintException

writeSymbolMarkerOptions(target, symbolMarker)

source code 

Writes configuration attributes of a symbol marker

@param target @param symbolMarker @raise PaintException

writeMarkerState(target, markerState)

source code 

Writes configuration attributes of a marker

@param target @param markerState @raise PaintException

writeBaseLineOptions(target, baseLineOptions)

source code 

Writes configuration attributes common to all lines series such as line, spline and area.

@param target @param baseLineOptions @raise PaintException

writeSplineOptions(target, splineOptions)

source code 

Writes configuration attributes of a spline series

@param target @param splineOptions @raise PaintException

writeScatterOptions(target, scatterOptions)

source code 

Writes configuration attributes of s scatter series

@param target @param scatterOptions @raise PaintException

writeLineOptions(target, lineOptions)

source code 

Writes configuration attributes of a line series

@param target @param lineOptions @raise PaintException

writeAreaOptions(target, areaOptions)

source code 

Writes configuration attributes of an area series

@param target @param areaOptions @raise PaintException

writeAreaSplineOptions(target, areaSplineOptions)

source code 

Writes configuration attributes of an area-spline

@param target @param areaSplineOptions @raise PaintException

writePieOptions(target, pieOptions)

source code 

Writes configuration attributes of a pie series

@param target @param pieOptions @raise PaintException

writeBaseBarOptions(target, baseBarOptions)

source code 

Writes configuration attributes common to columnar series such as bar and column

@param target @param baseBarOptions @raise PaintException

writeBarOptions(target, barOptions)

source code 

Writes configuration attributes of a bar series

@param target @param barOptions @raise PaintException

writeColumnOptions(target, columnOptions)

source code 

Writes configuration attributes of a column series

@param target @param columnOptions @raise PaintException

writeSeries(target, chartSeriesType, data, xAxes, yAxes)

source code 

Writes data of each series of the chart. It transforms data into a form which is usable by the Muntjac terminal class. It also writes configuration attributes specific to each series, if any.

@param target @param chartSeriesType @param data @param xAxes @param yAxes @throws PaintException

writePoints(target, points)

source code 

Writes point data (x, y) and its configuration attributes, if any. If a point does not have x and y values then the point is skipped. However, for such points empty tags is created without any attributes or children.

@param target @param points @throws PaintException

writeBaseAxis(target, axis, axes)

source code 

Writes configuration attributes common to all types of axis.

@param target @param axis @param axes @throws PaintException

getXAxisIndex(indexOfXAxis, xAxes)

source code 

Returns an index of an x-axis in a list of x-axis only if the x-axis exists otherwise null

@param indexOfXAxis @param xAxes

Returns:
Retrieves Retrieves an index of an x-axis in a list of x-axis only if the x-axis exists otherwise null

getYAxisIndex(indexOfYAxis, yAxes)

source code 

Returns an index of a y-axis in a list of y-axis only if the y-axis exists otherwise null

@param indexOfYAxis @param yAxes

Returns:
Returns index of a y-axis in a list of y-axis only if the y-axis exists otherwise null

getAxisIndex(indexOfAxis, axes)

source code 

Returns an index of an axis in a list of axis only if the axis exists otherwise null

@param indexOfAxis @param axes

Returns:
Returns an index of an axis in a list of axis only if the axis exists otherwise null

writePlotBands(target, plotBands)

source code 

Writes configuration attributes of the plotbands associated with an axis.

@param target @param plotBands @throws PaintException

writePlotLabel(target, plotLabel)

source code 

Writes configuration attributes of a plotlabel.

@param target @param plotLabel @throws PaintException

writePlotBandRange(target, plotBandRange)

source code 

Writes from/to value for a plotband. It considers date and number values separately.

@param target @param plotBandRange @throws PaintException

writePlotLines(target, plotLines)

source code 

Writes configuration attributes of the plotlines

@param target @param plotLines @throws PaintException

writePlotLineValue(target, plotLineValue)

source code 

Writes value of a plotline. It considers date and number value separately.

@param target @param plotLineValue @throws PaintException

writeAxisMinorTick(target, tick)

source code 

Writes configuration attributes of an axis. Depending on type of the argument tick, it either writes attributes for MinorTick or Tick

@param target @param tick @raise PaintException

writeAxisMinorGrid(target, grid)

source code 

Writes configuration attributes of an axis. Depending on type of the argument tick, it either writes attributes for MinorGrid or Grid

@param target @param grid @raise PaintException

writeXAxes(target, axes, config)

source code 

Iteratively processes each x-axis and writes configuration attributes of each axis based on type of the axis e.g. NumberAxis, DateTimeAxis and CategoryAxis

@param target @param axes @raise PaintException

getDate(dt, isIncludeTime=False)

source code 

Returns milliseconds of the date argument dt. If the argument isIncludeTime is false then the returned milliseconds does not include time.

getYearFromDate(date)

source code 
Returns:
Returns year of the argument date.

getMonthFromDate(date)

source code 
Returns:
Returns month of the argument date. The returned values is based on zero-index i.e. for month January, the values returned is "0"

writeChartDataUpdates(target, seriesCURMap)

source code 

Writes information about which series were added, removed or updated. This information is used by Muntjac terminal class to decide whether to add a new series or remove/delete an existing series. Basically, this information helps client to update only a portion of the chart instead of full chart.