Tool tip in pie charts


#1

Hi,

Can any one tell me how to create a tool tip in pie charts

:cry:


#2

Greetings Program!

I don’t believe you can do crosshair tooltips on a pie chart.

What you could do is manually pop up a label when the chart data point is touched:

- (void)sChart:(ShinobiChart *)chart toggledSelectionForRadialPoint:(SChartRadialDataPoint *)dataPoint inSeries:(SChartRadialSeries *)series atPixelCoordinate:(CGPoint)pixelPoint{
    NSLog(@"Data Point Name: %@", dataPoint.name);

    // Create tooltip label and add to view.
}

or perhaps change the label in the slice:

-(void)sChart:(ShinobiChart *)chart alterLabel:(UILabel *)label forDatapoint:(SChartRadialDataPoint *)datapoint atSliceIndex:(NSInteger)index inRadialSeries:(SChartRadialSeries *)series
{
    NSLog(@"alterLabel");
}

or add a gesture recognizer and pop up the tooltip label depending what slice the touch is at.

Wg