Mixed/Combo Chart not working
FynnFlueggeFletec opened this issue · 0 comments
FynnFlueggeFletec commented
Hi,
I want to draw a Combo Chart with Bars and Lines as in this example https://apexcharts.com/javascript-chart-demos/mixed-charts/line-column/ but I got a chart with only lines and no columns/bars when I implement it as described in the Apexcharts documentation.
private fun createChart(): ApexCharts {
return ApexCharts().apply {
setSeries(*createSeries().toTypedArray())
setChart(Chart().apply {
type = Type.line
background = "transparent"
toolbar = Toolbar().apply { show = false }
height = "300px"
})
setPlotOptions(PlotOptions().apply {
bar = Bar().apply {
horizontal = false
columnWidth = "25%"
}
})
}
}
private fun createSeries(): List<Series<Double>>{
val series0 = Series<Double>().apply {
SeriesType.column
data = arrayOf(1.0,2.0,3.0)
}
val series1 = Series<Double>().apply {
SeriesType.line
data = arrayOf(4.0,5.0,6.0)
}
return listOf(series0, series1)
}
Expected behavior
The chart should contain three x-axis samples with one bar graph and one line graph.