Background image on ticklabel


#1

Hi there

Is is possible to add a stretchable background image to a Ticklabel in iOS? I have a graph where the Ticklabels are in the plot-area, and need a background on the label so that the info on the chart does not interfere with it.


#2

Hi,

You can get access to the ticklabel by comforming to SChartDelegate and using the method

-(void)sChart:(ShinobiChart *)chart alterTickMark:(SChartTickMark *)tickMark beforeAddingToAxis:(SChartAxis *)axis {
     UILabel *label = tickMark.tickLabel;

     if (label) {
         // Add your background image to label here
     }
}

I hope that helps!

Sam


#3

how to set background image of shinobi chart in objective c. send if possible on nitin.jaswal@imvisile.com plz smiley confuse


#4

Hi Nitin,

I believe my colleague responded to a separate ticket regarding this question. His suggestion was to use

chart.backgroundColor = [UIColor colorWithPatternImage:<image>];

In the future, would you mind opening a new forum thread if your issue isn’t related to the original poster’s problem?

Thanks very much.

Sam