Code Monkey home page Code Monkey logo

Comments (2)

Shestac92 avatar Shestac92 commented on May 21, 2024

@gmcodebuster
You can adjust the waterfall appearance like this:

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

Waterfall waterfall = AnyChart.waterfall();

List<DataEntry> data = new ArrayList<>();
data.add(new ValueDataEntry("Start", 23));
data.add(new ValueDataEntry("Jan", 22));
data.add(new ValueDataEntry("Feb", -46));
data.add(new ValueDataEntry("Mar", -91));
data.add(new ValueDataEntry("Apr", 37));
data.add(new ValueDataEntry("May", -21));
data.add(new ValueDataEntry("Jun", 53));
data.add(new ValueDataEntry("Jul", 31));
data.add(new ValueDataEntry("Aug", -15));
data.add(new ValueDataEntry("Sep", 42));
data.add(new ValueDataEntry("Oct", 53));
data.add(new ValueDataEntry("Nov", -15));
data.add(new ValueDataEntry("Dec", 51));
DataEntry end = new DataEntry();
end.setValue("x", "End");
end.setValue("isTotal", true);
data.add(end);

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

com.anychart.core.waterfall.series.Waterfall series = waterfall.waterfall(set, "");

series.normal().fill("#ff6666 0.3");
series.normal().hatchFill("forward-diagonal", "#ff6666", 0.5, 10);
series.normal().stroke("#ff6666");
series.hovered().fill("#ff6666 0.1");
series.hovered().hatchFill("forward-diagonal", "#ff6666", 0.5, 10);
series.hovered().stroke("#ff6666 2");
series.selected().fill("#ff6666", 0.5);
series.selected().hatchFill("forward-diagonal", "#ff6666", 0.5, 10);
series.selected().stroke("#ff6666 4");

series.normal().fallingFill("#00cc99", 0.3);
series.normal().fallingStroke("#00cc99", 1, "10 5", "round", "null");
series.hovered().fallingFill("#00cc99", 0.1);
series.hovered().fallingStroke("#00cc99", 2, "10 5", "round", "null");
series.selected().fallingFill("#00cc99", 0.5);
series.selected().fallingStroke("#00cc99", 4, "10 5", "round", "null");

series.normal().risingFill("#0066cc", 0.3);
series.normal().risingStroke("#0066cc");
series.hovered().risingFill("#0066cc", 0.1);
series.hovered().risingStroke("#0066cc 2");
series.selected().risingFill("#0066cc", 0.5);
series.selected().risingStroke("#0066cc 4");

waterfall.title("Waterfall Chart: Appearance");

anyChartView.setChart(waterfall);

from anychart-android.

gmcodebuster avatar gmcodebuster commented on May 21, 2024

Thank you for your prompt reply, Code works like charm.
I would like to know whether color setting code is documented in repository? If yes please share a link,
If not please add this code in sample example or in documentation so It will helpful to others.

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.