module Ext_chart_axis_Axis:Defines axis for charts. The axis position, type, ...sig
..end
Defines axis for charts. The axis position, type, style can be configured. The axes are defined in an axes array of configuration objects where the type, field, grid and other configuration options can be set. To know more about how to create a Chart please check the Chart class documentation. Here's an example for the axes part: An example of axis for a series (in this case for an area chart that has multiple layers of yFields) could be:
axes: [{
type: 'Numeric',
position: 'left',
fields: ['data1', 'data2', 'data3'],
title: 'Number of Hits',
grid: {
odd: {
opacity: 1,
fill: '#ddd',
stroke: '#bbb',
'stroke-width': 1
}
},
minimum: 0
}, {
type: 'Category',
position: 'bottom',
fields: ['name'],
title: 'Month of the Year',
grid: true,
label: {
rotate: {
degrees: 315
}
}
}]
In this case we use a Numeric
axis for displaying the values of the Area series and a Category
axis for displaying the names of
the store elements. The numeric axis is placed on the left of the screen, while the category axis is placed at the bottom of the chart.
Both the category and numeric axes have grid
set, which means that horizontal and vertical lines will cover the chart background. In the
category axis the labels will be rotated so they can fit the space better.
class type t =object
..end
class type configs =object
..end
class type events =object
..end
class type statics =object
..end
val of_configs : configs Js.t -> t Js.t
of_configs c
casts a config object c
to an instance of class t
val to_configs : t Js.t -> configs Js.t
to_configs o
casts instance o
of class t
to a config object