stz-util Documentation - v1.5.2
Preparing search index...
BarChartBuilder
Interface BarChartBuilder
interface
BarChartBuilder
{
addDataLabels
(
defultDataLabels
?:
boolean
,
dataLabelsOptions
?:
Partial
<
DataLabels
>
,
)
:
this
;
addZoom
(
defaultZoom
?:
boolean
,
zoomOption
?:
object
)
:
this
;
build
(
id
?:
string
)
:
ChartConfig
;
customLegend
(
obj
:
HtmlLegendOptions
)
:
this
;
getChartData
(
uid
:
string
)
:
object
;
hasPlugin
(
pluginId
:
string
)
:
boolean
;
makeConfig
(
id
?:
string
)
:
ChartConfig
;
onResize
(
callback
:
(
chart
:
Chart
<
any
>
,
size
:
{
height
:
number
;
width
:
number
}
,
)
=>
void
,
)
:
this
;
removePlugin
(
pluginId
:
string
)
:
this
;
setAllBarPercentage
(
percentage
:
number
)
:
this
;
setAllBarThickness
(
thickness
:
number
)
:
this
;
setAllBorderRadius
(
borderRadius
:
number
)
:
this
;
setAllBorderWidth
(
borderWidth
:
number
)
:
this
;
setAllCategoryPercentage
(
percentage
:
number
)
:
this
;
setAllDatasetsParsing
(
xAxisKey
:
string
|
false
,
yAxisKey
:
string
|
false
,
)
:
this
;
setAllMaxBarThickness
(
maxThickness
:
number
)
:
this
;
setAxisPosition
(
axis
:
string
,
position
:
"left"
|
"right"
)
:
this
;
setAxisRange
(
axis
:
"x"
|
"y"
,
min
?:
number
,
max
?:
number
)
:
this
;
setAxisTitle
(
axis
:
"x"
|
"y"
,
titleConfig
:
CommonCartesianTitleConfig
,
)
:
this
;
setBackgroundAlpha
(
alpha
:
number
)
:
this
;
setBackgroundColor
(
color
:
Color
)
:
this
;
setBarImg
(
axis
:
string
)
:
this
;
setBarPercentage
(
datasetIndex
:
number
,
percentage
:
number
)
:
this
;
setBarThickness
(
datasetIndex
:
number
,
thickness
:
number
)
:
this
;
setBorderRadius
(
datasetIndex
:
number
,
borderRadius
:
number
)
:
this
;
setBorderWidth
(
datasetIndex
:
number
,
borderWidth
:
number
)
:
this
;
setCategoryPercentage
(
datasetIndex
:
number
,
percentage
:
number
)
:
this
;
setChartData
(
uid
:
string
,
data
:
any
)
:
void
;
setDatasetParsing
(
datasetIndex
:
number
,
xAxisKey
:
string
|
false
,
yAxisKey
:
string
|
false
,
)
:
this
;
setGrid
(
axis
:
string
,
gridOptions
:
GridLineOptions
)
:
this
;
setGridOptions
(
axis
:
"x"
|
"y"
,
gridOptions
:
{
color
?:
string
;
display
?:
boolean
;
lineWidth
?:
number
}
,
)
:
this
;
setLegend
(
legendOptions
:
DeepPartial
<
LegendOptions
<
any
>
>
)
:
this
;
setMaxBarThickness
(
datasetIndex
:
number
,
maxThickness
:
number
)
:
this
;
setPadding
(
padding
:
any
)
:
this
;
setParsingKey
(
xAxisKey
:
string
|
false
,
yAxisKey
:
string
|
false
)
:
this
;
setPlugin
(
plugins
:
any
)
:
this
;
setScales
(
scales
:
CommonAxesSacels
)
:
this
;
setStacked
(
isStacked
:
boolean
)
:
this
;
setTitle
(
titleOptions
:
CommonCartesianTitleConfig
)
:
this
;
setYAxisForDataset
(
datasetIndex
:
number
,
axisId
?:
string
)
:
this
;
setYAxisID
(
datasetIndex
:
number
,
axisID
:
string
)
:
this
;
sparkBarChart
()
:
this
;
}
Hierarchy (
View Summary
)
CartesianChartBuilder
<
"bar"
>
BarChartBuilder
Implemented by
BarChartWrapper
Index
Methods
add
Data
Labels
add
Zoom
build
custom
Legend
get
Chart
Data
has
Plugin
make
Config
on
Resize
remove
Plugin
set
All
Bar
Percentage
set
All
Bar
Thickness
set
All
Border
Radius
set
All
Border
Width
set
All
Category
Percentage
set
All
Datasets
Parsing
set
All
Max
Bar
Thickness
set
Axis
Position
set
Axis
Range
set
Axis
Title
set
Background
Alpha
set
Background
Color
set
Bar
Img
set
Bar
Percentage
set
Bar
Thickness
set
Border
Radius
set
Border
Width
set
Category
Percentage
set
Chart
Data
set
Dataset
Parsing
set
Grid
set
Grid
Options
set
Legend
set
Max
Bar
Thickness
set
Padding
set
Parsing
Key
set
Plugin
set
Scales
set
Stacked
set
Title
set
Y
Axis
For
Dataset
set
Y
Axis
ID
spark
Bar
Chart
Methods
add
Data
Labels
addDataLabels
(
defultDataLabels
?:
boolean
,
dataLabelsOptions
?:
Partial
<
DataLabels
>
,
)
:
this
Parameters
Optional
defultDataLabels
:
boolean
Optional
dataLabelsOptions
:
Partial
<
DataLabels
>
Returns
this
add
Zoom
addZoom
(
defaultZoom
?:
boolean
,
zoomOption
?:
object
)
:
this
Parameters
Optional
defaultZoom
:
boolean
Optional
zoomOption
:
object
Returns
this
build
build
(
id
?:
string
)
:
ChartConfig
Parameters
Optional
id
:
string
Returns
ChartConfig
custom
Legend
customLegend
(
obj
:
HtmlLegendOptions
)
:
this
Parameters
obj
:
HtmlLegendOptions
Returns
this
get
Chart
Data
getChartData
(
uid
:
string
)
:
object
Parameters
uid
:
string
Returns
object
has
Plugin
hasPlugin
(
pluginId
:
string
)
:
boolean
Parameters
pluginId
:
string
Returns
boolean
make
Config
makeConfig
(
id
?:
string
)
:
ChartConfig
Parameters
Optional
id
:
string
Returns
ChartConfig
on
Resize
onResize
(
callback
:
(
chart
:
Chart
<
any
>
,
size
:
{
height
:
number
;
width
:
number
}
,
)
=>
void
,
)
:
this
Parameters
callback
:
(
chart
:
Chart
<
any
>
,
size
:
{
height
:
number
;
width
:
number
}
)
=>
void
Returns
this
remove
Plugin
removePlugin
(
pluginId
:
string
)
:
this
Parameters
pluginId
:
string
Returns
this
set
All
Bar
Percentage
setAllBarPercentage
(
percentage
:
number
)
:
this
Parameters
percentage
:
number
Returns
this
set
All
Bar
Thickness
setAllBarThickness
(
thickness
:
number
)
:
this
Parameters
thickness
:
number
Returns
this
set
All
Border
Radius
setAllBorderRadius
(
borderRadius
:
number
)
:
this
Parameters
borderRadius
:
number
Returns
this
set
All
Border
Width
setAllBorderWidth
(
borderWidth
:
number
)
:
this
Parameters
borderWidth
:
number
Returns
this
set
All
Category
Percentage
setAllCategoryPercentage
(
percentage
:
number
)
:
this
Parameters
percentage
:
number
Returns
this
set
All
Datasets
Parsing
setAllDatasetsParsing
(
xAxisKey
:
string
|
false
,
yAxisKey
:
string
|
false
)
:
this
Parameters
xAxisKey
:
string
|
false
yAxisKey
:
string
|
false
Returns
this
set
All
Max
Bar
Thickness
setAllMaxBarThickness
(
maxThickness
:
number
)
:
this
Parameters
maxThickness
:
number
Returns
this
set
Axis
Position
setAxisPosition
(
axis
:
string
,
position
:
"left"
|
"right"
)
:
this
Parameters
axis
:
string
position
:
"left"
|
"right"
Returns
this
set
Axis
Range
setAxisRange
(
axis
:
"x"
|
"y"
,
min
?:
number
,
max
?:
number
)
:
this
Parameters
axis
:
"x"
|
"y"
Optional
min
:
number
Optional
max
:
number
Returns
this
set
Axis
Title
setAxisTitle
(
axis
:
"x"
|
"y"
,
titleConfig
:
CommonCartesianTitleConfig
)
:
this
Parameters
axis
:
"x"
|
"y"
titleConfig
:
CommonCartesianTitleConfig
Returns
this
set
Background
Alpha
setBackgroundAlpha
(
alpha
:
number
)
:
this
Parameters
alpha
:
number
Returns
this
set
Background
Color
setBackgroundColor
(
color
:
Color
)
:
this
Parameters
color
:
Color
Returns
this
set
Bar
Img
setBarImg
(
axis
:
string
)
:
this
Parameters
axis
:
string
Returns
this
set
Bar
Percentage
setBarPercentage
(
datasetIndex
:
number
,
percentage
:
number
)
:
this
Parameters
datasetIndex
:
number
percentage
:
number
Returns
this
set
Bar
Thickness
setBarThickness
(
datasetIndex
:
number
,
thickness
:
number
)
:
this
Parameters
datasetIndex
:
number
thickness
:
number
Returns
this
set
Border
Radius
setBorderRadius
(
datasetIndex
:
number
,
borderRadius
:
number
)
:
this
Parameters
datasetIndex
:
number
borderRadius
:
number
Returns
this
set
Border
Width
setBorderWidth
(
datasetIndex
:
number
,
borderWidth
:
number
)
:
this
Parameters
datasetIndex
:
number
borderWidth
:
number
Returns
this
set
Category
Percentage
setCategoryPercentage
(
datasetIndex
:
number
,
percentage
:
number
)
:
this
Parameters
datasetIndex
:
number
percentage
:
number
Returns
this
set
Chart
Data
setChartData
(
uid
:
string
,
data
:
any
)
:
void
Parameters
uid
:
string
data
:
any
Returns
void
set
Dataset
Parsing
setDatasetParsing
(
datasetIndex
:
number
,
xAxisKey
:
string
|
false
,
yAxisKey
:
string
|
false
,
)
:
this
Parameters
datasetIndex
:
number
xAxisKey
:
string
|
false
yAxisKey
:
string
|
false
Returns
this
set
Grid
setGrid
(
axis
:
string
,
gridOptions
:
GridLineOptions
)
:
this
Parameters
axis
:
string
gridOptions
:
GridLineOptions
Returns
this
set
Grid
Options
setGridOptions
(
axis
:
"x"
|
"y"
,
gridOptions
:
{
color
?:
string
;
display
?:
boolean
;
lineWidth
?:
number
}
,
)
:
this
Parameters
axis
:
"x"
|
"y"
gridOptions
:
{
color
?:
string
;
display
?:
boolean
;
lineWidth
?:
number
}
Returns
this
set
Legend
setLegend
(
legendOptions
:
DeepPartial
<
LegendOptions
<
any
>
>
)
:
this
Parameters
legendOptions
:
DeepPartial
<
LegendOptions
<
any
>
>
Returns
this
set
Max
Bar
Thickness
setMaxBarThickness
(
datasetIndex
:
number
,
maxThickness
:
number
)
:
this
Parameters
datasetIndex
:
number
maxThickness
:
number
Returns
this
set
Padding
setPadding
(
padding
:
any
)
:
this
Parameters
padding
:
any
Returns
this
set
Parsing
Key
setParsingKey
(
xAxisKey
:
string
|
false
,
yAxisKey
:
string
|
false
)
:
this
Parameters
xAxisKey
:
string
|
false
yAxisKey
:
string
|
false
Returns
this
set
Plugin
setPlugin
(
plugins
:
any
)
:
this
Parameters
plugins
:
any
Returns
this
set
Scales
setScales
(
scales
:
CommonAxesSacels
)
:
this
Parameters
scales
:
CommonAxesSacels
Returns
this
set
Stacked
setStacked
(
isStacked
:
boolean
)
:
this
Parameters
isStacked
:
boolean
Returns
this
set
Title
setTitle
(
titleOptions
:
CommonCartesianTitleConfig
)
:
this
Parameters
titleOptions
:
CommonCartesianTitleConfig
Returns
this
set
Y
Axis
For
Dataset
setYAxisForDataset
(
datasetIndex
:
number
,
axisId
?:
string
)
:
this
Parameters
datasetIndex
:
number
Optional
axisId
:
string
Returns
this
set
Y
Axis
ID
setYAxisID
(
datasetIndex
:
number
,
axisID
:
string
)
:
this
Parameters
datasetIndex
:
number
axisID
:
string
Returns
this
spark
Bar
Chart
sparkBarChart
()
:
this
Returns
this
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
Methods
add
Data
Labels
add
Zoom
build
custom
Legend
get
Chart
Data
has
Plugin
make
Config
on
Resize
remove
Plugin
set
All
Bar
Percentage
set
All
Bar
Thickness
set
All
Border
Radius
set
All
Border
Width
set
All
Category
Percentage
set
All
Datasets
Parsing
set
All
Max
Bar
Thickness
set
Axis
Position
set
Axis
Range
set
Axis
Title
set
Background
Alpha
set
Background
Color
set
Bar
Img
set
Bar
Percentage
set
Bar
Thickness
set
Border
Radius
set
Border
Width
set
Category
Percentage
set
Chart
Data
set
Dataset
Parsing
set
Grid
set
Grid
Options
set
Legend
set
Max
Bar
Thickness
set
Padding
set
Parsing
Key
set
Plugin
set
Scales
set
Stacked
set
Title
set
Y
Axis
For
Dataset
set
Y
Axis
ID
spark
Bar
Chart
stz-util Documentation - v1.5.2
Loading...