Class: c3.Polar.Layer Abstract

Defined in: js/c3-polar.coffee

Overview

This class is abstract.

A layer for a polar chart.

Author:

Direct Known Subclasses

c3.Polar.Layer.Radial c3.Polar.Layer.Segment

Variables Summary

version =
0.1
type =
'layer'
_next_uid =
0
data =
undefined

[Array] Data for this layer This can be set for each individual layer or a default for the entire chart.

name =
undefined

[String] User name for this layer. This is used in legends, for example.

class =
undefined

[String] CSS class to assign to this layer for user style sheets to customize

r =
undefined

[d3.scale] Scale for the radial dimension for this layer. Please set the domain(), c3 will set the range(). The scale may be set for the entire chart instead of for each layer.

t =
undefined

[d3.scale] Scale for the angular dimension for this layer. Please set the domain(), c3 will set the range(). The scale may be set for the entire chart instead of for each layer.

options =
undefined

[c3.Selection.Options] Options to set the class, classes, styles, events, and title for this layer.

handlers =
undefined

[Object] An object to setup event handlers to catch events triggered by this c3 layer. The keys represent event names and the values are the cooresponding handlers.

restyle =
Layer

Instance Method Summary

Constructor Details

# (void) constructor(opt)

Instance Method Details

# (void) init(chart, g) Bound

Internal function for the Polar Chart to prepare the layer

# (void) _init()

# (void) size(width, height) Bound

Resize the layer, but don't update the rendering. resize() handles both with draw()

# (void) _size()

# (void) update(origin) Bound

Update the DOM bindings based on the new or modified data set

# (void) _update()

# (void) draw(origin) Bound

Position the DOM elements based on the current scales

# (void) _draw()

# (void) style(style_new) Bound

Restyle existing items in the layer

# (void) _style()

# (void) redraw(origin = 'redraw') Bound

# (Array<Number>) toPolar(x, y) Bound

Convert cartesean x,y coordinates to polar coordinates based on this layer's scales.

Parameters:

  • x ( Number ) x pixel value with 0 in the middle
  • y ( Number ) y pixel value with 0 in the middle

Returns:

  • ( Array<Number> ) — Array of theta in this layer's t domain and radial distance in this layer's r domain.

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: