Coder Social home page Coder Social logo

Comments (5)

linheimx avatar linheimx commented on September 28, 2024

you can set ValueAdapter for yAxis,like this:

 yAxis.set_ValueAdapter(new IValueAdapter() {
            @Override
            public String value2String(double value) {
                if (value == 1) {
                    return "2015 year";
                } else if (value == 10) {
                    return "2016 year";
                } else {
                    return "2017 year";
                }
            }
        });

from lchart.

megifernanda avatar megifernanda commented on September 28, 2024

i tried this, it's just show 2017 year

i tried xAxis

from lchart.

linheimx avatar linheimx commented on September 28, 2024

assume your line data is:

(1,10),(10,100),(20,3)

you can adapter
1--->2015 year
10--->2016 year
other--->2017 year

if your data contain (2,100)
2 is other,so show the 2017 year

from lchart.

megifernanda avatar megifernanda commented on September 28, 2024

can you help me sir?

i want data with month

January untill december, how to make it?

i tried this

         xAxis.set_ValueAdapter(new IValueAdapter() {
          @Override
        public String value2String(double value) {
            if (value == 1) {
                return "Januari";
            }

            else if (value == 2) {
                return "Februari";
            }
            else if (value == 3) {
                return "MAret";
            }

            else if (value == 4) {
                return "April";
            }

            else if (value == 5) {
                return "Juni";
            }

        }


    });

from lchart.

linheimx avatar linheimx commented on September 28, 2024

if your data like ''(1,x),(2,x),(3,x),(4,x)...''
your adapter is ok

attention:
there are some way to calculate the values in axis.
if want show all label in axis,please set xAxis.setCalWay(Axis.CalWay.every);
(three calcute way like:perfect,justAvg,every,you can try it )

from lchart.

Related Issues (13)

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.