hi ,
i have a listview. i want click on item of listview then selected section of piechart.
how can i do?
Regards fatemeh
i down it.....:-)
You can use the method public void highlightValues(Highlight[] highs) to highlight values.
Example
Highlight h = new Highlight(x-index, dataSetIndex); // dataset index for piechart is always 0
chart.highlightValues(new Highlight[] { h });
@PhilJay
Thanks alot
I try this, but it not trigger OnChartValueSelectedListener() , what should I do ? @PhilJay
If you want to trigger the listener, call highlightTouch(...)
@PhilJay
Hi!
I click a value on the graph and it gets selected. When I then call highlightValues(...) or highlightTouch(...) it gets deselected, but the next click on the graphic is ignored. It looks like it's waiting for that click to deselect the value...
Is there a way around this behavior?
Thanks!
@Manhazito Hi !
Did you find the solution ?
I have the same problem ... I still need to click twice on the slice to re-select it ...
thx
@jeanbaptisteODE
I did not! :-/
@jeanbaptisteODE
@Manhazito
mChart.highlightValue(null); worked for me
Hello Everyone,
How to set text format in Reverse like in circle wise,Please check attached image i want to set text like this in app using MPchart Lib in android.
I leave a comment for you guys.
I could call onValueSelected() in my RecyclerView Adapter.
pieChart.highlightValue(highlight, true);
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
holder.rl_root.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Highlight highlight = new Highlight((float)position, 0.0f, 0);
//pieChart.highlightValue(highlight); //doesn't call onValueSelected()
pieChart.highlightValue(highlight, true); //call onValueSelected()
}
});
}
Most helpful comment
You can use the method
public void highlightValues(Highlight[] highs)to highlight values.Example