Closed virtualpathum closed 8 months ago
Hello! CartesianChartHost
is a Vico 2 API. Please update to Vico 2 or use the equivalent Vico 1 API, which is Chart
.
I wrote another comment here a few minutes ago, asking for extra context, but I realized what’s going on a moment later, so I deleted it. Sorry for the extra notification.
I was referring to the given sample code and wanted to generate a chart like Chart5. Vico 2 is still in alpha, right? So, is there a sample code to refer to generate a stacked bar chart with Vico 1 API?
Yup, Vico 2 is in alpha, @virtualpathum, though it should be noted that this refers primarily to the stability of the API. I wouldn’t consider version 2.0.0 Alpha 8 less reliable than version 1.14.0, for example. Both versions are actively maintained, and we’ve addressed all reported issues for both, but Vico 2 has the advantage of including a large number of further optimizations, a consolidated API, and several new features (with more on the way). That said, while upcoming Vico 1 updates shouldn’t require any changes on your end, the Vico 2 API will be modified in the alpha stage.
To see the code for the Vico 1 version of the fifth sample chart, please select the correct tag (v1.14.0
). Here is a direct link.
Thanks for the prompt replies. Will check the given link.
You’re welcome! Let me know if you have any questions.
How to reproduce
This sounds basic but I keep getting this. However, in the same project, I can run LineChart without any issues. (com.patrykandpatrick.vico.core.chart.line.LineChart)
my build. gradle has this
what am I doing wrong?
Did clean build restart etc...
Observed behavior
Cannot create CartesianChartHost
Expected behavior
I need to create a stacked bar chart
Vico version(s)
Latest stable version
Android version(s)
27
Additional information
No response