0
votes

I am using HighChart for displaying graphs and I am showing Stacked chart. My issue is that I don't want to show HIBar name which generally display under graph to indicate the signs displayed in graph.

I have attached an image to Describe my query :

enter image description here

Here, I have marked what I want to hide with a black circle. What property should I use to hide the legend?

2

2 Answers

1
votes

The circeled area is the legend, so hiding the legend will do the trick, done like this:

legend: {
    enabled: false
},

Working example: http://jsfiddle.net/ewolden/k3Lkh13k/

API: https://api.highcharts.com/highcharts/legend.enabled

0
votes

For iOS Wrapper, add/update you existing code as per docs

#import <UIKit/UIKit.h>
#import <Highcharts/Highcharts.h>
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
    [super viewDidLoad];

    HIChartView *chartView = [[HIChartView alloc] initWithFrame:self.view.bounds];

    HIOptions *options = [[HIOptions alloc]init];
    ........
     //remaining code here
    ........
    HILegend *legend = [[HILegend alloc]init];   //add this
    legend.enabled = [[NSNumber alloc] initWithBool:false];   //add this
    ........
     //remaining code here
    ........
    options.legend = legend;  //add this

    chartView.options = options;

    [self.view addSubview:chartView];
}

@end