Class: c3.Polar.Layer.Segment Abstract

Defined in: js/c3-polar.coffee
Inherits: c3.Polar.Layer

Overview

This class is abstract.
TODO: Add text labels for arc segments if requested.

The root abstract layer for various other layers such as pie and sunburst charts. Do not create a layer of this type directly, instead instantiate one of it's children types.

Extensibility

Each layer creates the following c3.Selection members:

Author:

Direct Known Subclasses

c3.Polar.Layer.Arc c3.Polar.Layer.Pie c3.Polar.Layer.Sunburst

Variables Summary

version =
0.1
type =
'segment'
key =
undefined

REQUIRED [Function] Accessor function to define a unique key for each data element. This has performance implications and is required for some layers and animations.

value =
undefined

[Function] Accessor to get the value of the data element. Used when limiting the number of elements

limit_elements =
undefined

[Number] Limit the number of data elements to render based on their value. This affects the callback index parameter

pad =
undefined

[Number, Function] Number or callback to set the angle in radians to pad between arc segments

arc_options =
undefined

[c3.Selection.Options] Options to apply to each arc segment. For callbacks, the first argument is the data element the second argument is the index

Variable inherited from c3.Polar.Layer

version type _next_uid data name class r t options handlers restyle

Instance Method Summary

Inherited Method Summary

Methods inherited from c3.Polar.Layer

#init #_init #size #_size #update #_update #draw #_draw #style #_style #redraw #toPolar

Instance Method Details

# (void) _init() Bound

# (void) _update(origin) Bound

# (void) _draw(origin) Bound

# (void) _style(style_new) Bound

# (?) get_position_from_key(key) Bound

Return the calculated position for a data element

  • x1 - start angle in t domain
  • x2 - end angle in t domain
  • y1 - inner radius in r domain
  • y2 - outer radius in r domain

Parameters:

  • key ( Number ) The key for a data element to get the position for

Returns:

  • ( ? ) — Returns an object with the calculated position:

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: