Coder Social home page Coder Social logo

Comments (7)

lecho avatar lecho commented on July 22, 2024

There's a method ColumnChartView.setColumnChartData(ColumnChartData data).
In most cases you should use data model specific for given type of chart, for ColumnChartView it's ColumnChartData.

from hellocharts-android.

thomaslc66 avatar thomaslc66 commented on July 22, 2024

Thanks i've just seen you're answer. But i was doing it the right way.
Can you help me to set the label with the value on my columns??

from hellocharts-android.

lecho avatar lecho commented on July 22, 2024

If you mean label above column, use this method column.setHasLabels(true);

from hellocharts-android.

thomaslc66 avatar thomaslc66 commented on July 22, 2024

And i've done this

//values of the axeY
List<AxisValue> axisValues = new ArrayList<AxisValue>();
axisValues.add(new AxisValue(1));
axisValues.add(new AxisValue(2));
axisValues.add(new AxisValue(3));
axisValues.add(new AxisValue(4));
axisValues.add(new AxisValue(5));
axisValues.add(new AxisValue(6));
axisValues.add(new AxisValue(7));

//Gestion of the two axes for the graphic
Axis axeX = new Axis(axisValues);

data.setAxisXBottom(axeX);

But i didn't see my seven values in my axeX

from hellocharts-android.

thomaslc66 avatar thomaslc66 commented on July 22, 2024
  • althougth my axisY is display some of my number but not all. Only 1 to 6 but not 7. How can i make the graph show all of them.

Ps. I think you should write a documentation for you library it could be usefull

from hellocharts-android.

lecho avatar lecho commented on July 22, 2024

Yea, there should be documentation and I will try to add some but it will take time and right now I need a little break. Most of library functions are covered in samples project, but there will always be some special cases that I'm not aware of until someone open new issue.

Back to problem. Axes values have to be within chart viewport to be visible. By default viewport is calculated based on chart values. So for example if your max value on X axis is 6 no axis values greater than that will be displayed. Other possibility is some rounding error in viewport calculation.

Try to experiment with viewport size, here is simple example how to modify(extend) viewport in both directions by 10%:

Viewport v = new Viewport(chart.getMaximumViewport());
float dx = 0.1f * v.width();
float dy = 0.1f * v.height();
v.inset(-dx, -dy);
chart.setMaximumViewport(v);
chart.setCurrentViewport(v, false);

from hellocharts-android.

thomaslc66 avatar thomaslc66 commented on July 22, 2024

thanks for the help. the viewport thing help me to show more of the graph.

But my 1st problem was that i was not able to see the value of the graph

    //values of the axeY
    List<AxisValue> axisValuesForY = new ArrayList<AxisValue>();

    for (int i = 1; i < 100; i +=10){
        axisValuesForX.add(new AxisValue(i));
    }

    Axis axeX = new Axis(axisValuesForX);
    Axis axeY = new Axis(axisValuesForY);

    data.setAxisXBottom(axeX);
    data.setAxisYLeft(axeY);

i've done this and nothing show's up on the axeY neither for X.
Plus i've put this.

    axeX.setName("Days");
    axeY.setName("amount");

and only day is displayed

from hellocharts-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.