-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AnyChartView doesnot show at all in UI #219
Comments
it looks like I have to set absolute height like this:
though the layout file is still blank, but Pie Chart appears when running the app. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I add this in my layout file of a Fragment in Android Studio:
<com.anychart.AnyChartView
android:id="@+id/anyChartView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
the whole XML file shows blank in the IDE, remove it, all UI components show as expected. Though, I don't get error when adding the above component in the XML file. But when running it, the Pie Chart is not shown at all in screen. Here's the setting in
app/build.gradle:
(I noticed it's 1.1.5 in this link: https://github.com/AnyChart/AnyChart-Android/wiki/Getting-started, but my Android Studio is Electric Eel which is on Java 11 instead of 17, so I used 1.1.2)
I have to put "maven { url 'https://jitpack.io' }" in settings.gradle instead of allprojects{ } in root build.gradle to make it build successfully:
include ':app'
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
jcenter()
mavenCentral()
maven {
maven { url 'https://jitpack.io' }
}
}
}
This is how I draw the Pie Chart, pretty much copy from Getting Start link:
private void drawPieChart() {
AnyChartView anyChartView = getActivity().findViewById(R.id.anyChartView);
It sounds like it's caused by the fact : the component
<com.anychart.AnyChartView
android:id="@+id/anyChartView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
is not shown in xml layout in design view.
Not sure where to go at this point... Documentation is so limited and ambiguous, searching in web doesn't provide any helpful results at all.
The text was updated successfully, but these errors were encountered: