Coder Social home page Coder Social logo

Touching Points about hellocharts-android HOT 2 CLOSED

lecho avatar lecho commented on June 23, 2024
Touching Points

from hellocharts-android.

Comments (2)

lecho avatar lecho commented on June 23, 2024 1

Hi, I've just pushed fix for this, now you should be able to select value(point) from code using method:

SelectedValue sv = new new SelectedValue(lineIndex, pointIndex, SelectedValueType.NONE);
chart.selectValue(sv);

//deselect value by setting empty selected value, for example inside handler.postDelay() method
sv.clear();
chart.selectValue(sv)

Just be careful creating SelectedValue objects, first and second index have to point to value that exists in you dataset, otherwise ArrayIndexOutOfBounds will be thrown. So if you want to select the second point on the first line you should use:

new SelectedValue(0, 1, SelectedValueType.NONE);

Because lines and values are indexed starting from 0.

For other chart types it looks similar, for ColumnChart first index selects column, second index selects sub-column. For PieChart first index selects ArcValue, second index should have the same value as first index.

SelectValueType.NONE can be used for all chart type beside ComboLineColumnChart, for combo chart use SelectValueType.LINE if you want to select point, or use SelectValueType.COLUMN if you want to select sub-column value.

from hellocharts-android.

srombs avatar srombs commented on June 23, 2024

Awesome sir. Thank you very much. This was more than I was expecting. It works wonderfully.

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.