Giter Site home page Giter Site logo

Comments (5)

Shestac92 avatar Shestac92 commented on July 23, 2024

@KartikAggarwal
Do you mean multi-series column chart like this?

from anychart-android.

KartikAggarwal avatar KartikAggarwal commented on July 23, 2024

@Shestac92, Yes

from anychart-android.

Shestac92 avatar Shestac92 commented on July 23, 2024

@KartikAggarwal
Please, try this code to build a such column chart:

Cartesian cartesian = AnyChart.column();

List<DataEntry> data = new ArrayList<>();
data.add(new CustomDataEntry("Rouge", 10, 5, 9));
data.add(new CustomDataEntry("Foundation", 12, 5, 8));
data.add(new CustomDataEntry("Mascara", 4, 3, 7));

Set set = Set.instantiate();
set.data(data);

cartesian.labels("{position:'center', fontColor:'#000'}");

cartesian.column(set.mapAs("{'value': 'value'}"));
cartesian.column(set.mapAs("{'value': 'value1'}"));
cartesian.column(set.mapAs("{'value': 'value2'}"));

cartesian.yAxis(0).labels().format("${%Value}{groupsSeparator: }");

cartesian.yAxis(0).title("Revenue");

cartesian.labels()
         .enabled(true)
         .position("center-top")
         .anchor("center-bottom")
         .format("${%Value}{groupsSeparator: }");
cartesian.hovered().labels(false);

cartesian.legend()
         .enabled(true)
         .fontSize(13)
         .padding(0, 0, 20, 0);

cartesian.interactivity().hoverMode("single");

cartesian.tooltip()
          .positionMode("point")
          .position("center-top")
          .anchor("center-bottom")
          .offsetX(0)
          .offsetY(5)
          .titleFormat("{%X}")
          .format("{%SeriesName} : ${%Value}{groupsSeparator: }");

anyChartView.setChart(cartesian);


class CustomDataEntry extends ValueDataEntry {
    public CustomDataEntry(String x, Number value, Number value1, Number value2) {
        super(x, value);
        setValue("value1", value1);
        setValue("value2", value2);
    }
}

from anychart-android.

KartikAggarwal avatar KartikAggarwal commented on July 23, 2024

@Shestac92
Thanks, It works like charm. You have done great job in this library.

I have one more query regarding the custom column colors.

from anychart-android.

KartikAggarwal avatar KartikAggarwal commented on July 23, 2024

Problem resolved..:blush:

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.