Change color of Point in Line Series

2 posts, 0 answers
  1. Erika
    Erika avatar
    6 posts
    Member since:
    Jun 2014

    Posted 06 Nov 2014 Link to this post

    I need to change color of the point in my Line Series, with TKChartDelegate I just change the color of line and I want to change both.
  2. Erika
    Erika avatar
    6 posts
    Member since:
    Jun 2014

    Posted 07 Nov 2014 in reply to Erika Link to this post

    I found the method

    -(TKChartPaletteItem *)chart:(TKChart *)chart paletteItemForSeries:(TKChartSeries *)series atIndex:(NSUInteger)index{
        TKChartPaletteItem *item = nil;
        
        if (series.index == 0) {
            UIColor *fillColor = [UIColor colorWithRed:100/255.0f green:160/255.0f blue:255/255.0f alpha:1.0f];
            item = [[TKChartPaletteItem alloc] initWithFill:[TKSolidFill solidFillWithColor:fillColor]];
        }
        else {
            UIColor *fillColor = [UIColor colorWithRed:0/255.0f green:112/255.0f blue:240/255.0f alpha:1.0f];
            item = [[TKChartPaletteItem alloc] initWithFill:[TKSolidFill solidFillWithColor:fillColor]];
        }
        
        return item;
    }
  3. DevCraft banner
Back to Top