Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8880537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:11:02+00:00 2026-06-14T20:11:02+00:00

I’m trying to make the columns in my chart to be selectable and show

  • 0

I’m trying to make the columns in my chart to be selectable and show more details of the selected column when clicked. Every column is represented by one series (you will understand in a second).

this is how i build each series:

-(SChartSeries *)sChart:(ShinobiChart *)chart seriesAtIndex:(int)index {
    SChartColumnSeries *series = [SChartColumnSeries new];
    series.style.showAreaWithGradient = NO;
    series.stackIndex = [NSNumber numberWithInt:0];
    series.selectedStyle.showAreaWithGradient = NO;
    CHART_COLOR_TYPE dataType = [TestGraphDataManager getDataType:index];
    series.style.areaColor =    (dataType == ACCOUNT)?
                                    [UIColor colorWithRed:227.0f/255.0f green:179.0f/255.0f blue:0.0f/255.0f alpha:0.5f]:
                                    [UIColor colorWithRed:0.0f/255.0f green:172.0f/255.0f blue:235.0f/255.0f alpha:0.5f];

    series.selectedStyle.areaColor = [UIColor colorWithRed:129.0f/255.0f green:0.0f/255.0f blue:82.0f/255.0f alpha:0.5f];
    series.selectionMode = SChartSelectionSeries;

    series.style.lineColor = [UIColor clearColor];
    series.selectedStyle.lineColor = [UIColor clearColor];

    return series;
}

The problem I’m currently having is that only the first series is selectable. Also i made each bar represented by a different series so that i can toggle its color easly with series.selectionMode = SChartSelectionSeries

Finally I have this delegate event so that i can load the extra data but it’s also being called only for the first series

- (void)sChart:(ShinobiChart *)chart toggledSelectionForSeries:(SChartSeries *)series nearPoint:(SChartDataPoint *)dataPoint atPixelCoordinate:(CGPoint)pixelPoint{
    NSLog(@"click event called");
    //Display data
}

Does anyone know why this is happening? It’s been driving me insane all day.

Thank you, in advance for any help give.

EDIT:
I found the major problem as i do series.stackIndex = [NSNumber numberWithInt:0]; it makes all the bars with the same name stack (as nome of the names repeat its not a problem in my point of view), i do this so that all the bars are at the same distance from the tick marker and so that the bars aren’t very tine. But i believe that shinobi places invisible bars for those values and they are over the other, making only the first series selectable because its over the others. If i remove that line the graphic look horrible but all are clickable.
Any idea on how to bypass this or to avoid this problem?

how it should look (using stacking indexes) but it breaks the click events:
with stacking

without stacking indexes all bars are clickable but it doesn’t look as good, and it gets worse the more bars i have this is using only 4 bars:
without stacking

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:11:02+00:00Added an answer on June 14, 2026 at 8:11 pm

    Rob here from Shinobi – thanks for getting in touch!

    This can be solved by using subclassing, and returning zero for the column offset, like so:

    @interface MyColumnSeries : SChartColumnSeries
    @end
    
    @implementation MyColumnSeries
    - (double) offsetOfStackInChart:(ShinobiChart *)chart forDatapointIndex:(const int)pointIndex withPointSelector:(SEL)pointSelector
    {
        return 0.0;
    }
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I want to show the soap response to UIWebview.. my soap response is, <p><img

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.