GithubHelp home page GithubHelp logo

Comments (7)

Shestac92 avatar Shestac92 commented on June 25, 2024 4

@MuthuSubramaniam
thank you!
Please, try the following approach:

List<DataEntry> data = new ArrayList<>();
data.add(new ValueDataEntry("Apples", 6371664));
data.add(new ValueDataEntry("Pears", 789622));
data.add(new ValueDataEntry("Bananas", 7216301));
data.add(new ValueDataEntry("Grapes", 1486621));
data.add(new ValueDataEntry("Oranges", 1200000));

AnyChartView anyChartView = findViewById(R.id.any_chart_view);
APIlib.getInstance().setActiveAnyChartView(anyChartView);

Pie pie = AnyChart.pie();

pie.data(data);

anyChartView.setChart(pie);

AnyChartView anyChartView1 = findViewById(R.id.any_chart_view1);
APIlib.getInstance().setActiveAnyChartView(anyChartView1);

Pie pie1 = AnyChart.pie();

pie1.data(data);

anyChartView1.setChart(pie1);

from anychart-android.

Shestac92 avatar Shestac92 commented on June 25, 2024

@MuthuSubramaniam
Please, can you provide us your code to review it and suggest a proper solution?

from anychart-android.

MuthuSubramaniam avatar MuthuSubramaniam commented on June 25, 2024

`

<ScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent">


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:weightSum="4">

        <com.anychart.AnyChartView
            android:id="@+id/any_chart_view"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1" />

        <com.anychart.AnyChartView
            android:id="@+id/any_chart_view1"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1" />

        <com.anychart.AnyChartView
            android:id="@+id/any_chart_view2"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1" />

        <com.anychart.AnyChartView
            android:id="@+id/any_chart_view3"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1" />

    </LinearLayout>
</ScrollView>

`

from anychart-android.

Shestac92 avatar Shestac92 commented on June 25, 2024

@MuthuSubramaniam
Thank you for the layout, but we need the code which creates the chart.

from anychart-android.

MuthuSubramaniam avatar MuthuSubramaniam commented on June 25, 2024

`
Pie pie = AnyChart.pie();

    List<DataEntry> data = new ArrayList<>();
    data.add(new ValueDataEntry("John", 10000));
    data.add(new ValueDataEntry("Jake", 12000));
    data.add(new ValueDataEntry("Peter", 18000));
 
    pie.data(data);

    AnyChartView anyChartView = (AnyChartView) findViewById(R.id.any_chart_view);
    anyChartView.setChart(pie);

   AnyChartView anyChartView1 = (AnyChartView) findViewById(R.id.any_chart_view1);
    anyChartView1.setChart(pie);
  .
  .
  .
  .
  .

AnyChartView anyChartView5 = (AnyChartView) findViewById(R.id.any_chart_view5);
    anyChartView5.setChart(pie);

`

from anychart-android.

Poissac9 avatar Poissac9 commented on June 25, 2024

It didn't work for me

from anychart-android.

ZhaziraD avatar ZhaziraD commented on June 25, 2024

Is there any other solution?

from anychart-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.