CartesianLayer
CandlestickCartesianLayer
To create a CandlestickCartesianLayer
, use the XML attributes:
<style name="ChartStyle">
<item name="layers">candlestick</item>
<!-- ... -->
</style>
<com.patrykandpatrick.vico.views.cartesian.CartesianChartView
app:chartStyle="@style/ChartStyle"
<!-- ... --> />
Alternatively, use the CandlestickCartesianLayer
constructor:
cartesianChartView.chart = CartesianChart(CandlestickCartesianLayer(/* ... */), /* ... */)
ColumnCartesianLayer
To create a ColumnCartesianLayer
, use the XML attributes:
<style name="ChartStyle">
<item name="layers">column</item>
<!-- ... -->
</style>
<com.patrykandpatrick.vico.views.cartesian.CartesianChartView
app:chartStyle="@style/ChartStyle"
<!-- ... --> />
Alternatively, use the ColumnCartesianLayer
constructors:
cartesianChartView.chart = CartesianChart(ColumnCartesianLayer(/* ... */), /* ... */)
LineCartesianLayer
To create a LineCartesianLayer
, use the XML attributes:
<style name="ChartStyle">
<item name="layers">line</item>
<!-- ... -->
</style>
<com.patrykandpatrick.vico.views.cartesian.CartesianChartView
app:chartStyle="@style/ChartStyle"
<!-- ... --> />
Alternatively, use the LineCartesianLayer
constructors:
cartesianChartView.chart = CartesianChart(LineCartesianLayer(/* ... */), /* ... */)
CartesianLayer
sYou can add multiple CartesianLayer
s by separating their names with pipes:
<style name="ChartStyle">
<item name="layers">column|line</item>
<!-- ... -->
</style>
<com.patrykandpatrick.vico.views.cartesian.CartesianChartView
app:chartStyle="@style/ChartStyle"
<!-- ... --> />