Coder Social home page Coder Social logo

Comments (3)

lecho avatar lecho commented on July 22, 2024

Hi,
I've just pushed fix for this in 1a28467
Let me know it that helps, if not just reopen this issue.

Btw. if you use custom values for X axis, could you tell me how many values have that axis? Have you used method Axis.getMaxLabelChars(int maxLabelCharts)?

from hellocharts-android.

mohsenk avatar mohsenk commented on July 22, 2024

Hi when you set chart point with x = 0 you get this exception.
maybe this is not a bug , but i think you must be handle that exception.
Thanks.

from hellocharts-android.

kitolog avatar kitolog commented on July 22, 2024

Hi, I get
java.lang.ArithmeticException: divide by zero in lecho.lib.hellocharts.renderer.AxesRenderer.prepareCustomAxis
This exception occurs when I have only one value for LineChartData.
My point data looks like this:
PointValue [x=1.4261441E12, y=64.0] where 'x' is timestamp. I want to show day of week on x axis, so I add also a list of AxisValue where
AxisValue [label=[T,h,u], value=1.426144100352E12]
Then:

lineChartData = new LineChartData();
Axis axis = new Axis(axisLabels).setHasLines(true);
axis.setMaxLabelChars(100);
lineChartData.setAxisXBottom(axis); //! THIS LINE CAUSE AN EXCEPTION
lineChartData.setAxisYLeft(new Axis().setHasLines(true));
lineChartData.setLines(graphLines);

Removing lineChartData.setAxisXBottom(axis); line resolve the problem, but custom x axis label don't work in this case

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.