Remove borders on the shinobi chart


#1

Can you please tell me how to remove the border from my shinobi chart. Basically I want to just retain the X and Y axis and remove the border line on the top and right side of the shinobi chart .

Attached picture for reference  Shinobi_chart_graph


#2

Greetings Program!

I can’t see an attachment but do you mean the x and y axis lines?

xAxis.style.lineColor = [UIColor clearColor];
yAxis.style.lineColor = [UIColor clearColor];

Wg


#3

Uploaded the image link to dropbox - 

Link : https://www.dropbox.com/s/qovbyy6yds13pfe/x-axis-pan.PNG?dl=0

In the uploaded png file, if you see the graph portion , there is a rectangle within which the graph is plotted. The left and bottom sides correspond to the y-axis and x-axis respectively. I need to remove the top and right side so that only the x-axis and y-axis remain. Can you please tell me how to do this 

My initialization for the shinobi chart is as follows :

CGFloat margin = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) ? 0.0 : 50.0;

     _shinobiChart = [[ShinobiChartalloc] initWithFrame:CGRectInset(graph.bounds, margin, margin) withPrimaryXAxisType:SChartAxisTypeDateTimewithPrimaryYAxisType:SChartAxisTypeNumber];

     

     _shinobiChart.userInteractionEnabled = YES;

     _shinobiChart.autoresizingMask =  ~UIViewAutoresizingNone;

     _shinobiChart.datasource = self;

     _shinobiChart.delegate = self;

     _shinobiChart.licenseKey = ShinobiLicenceKey;

     _shinobiChart.gesturePanType = SChartGesturePanTypeNone;

     _shinobiChart.canvasInset = UIEdgeInsetsMake(2, 0, 0, 5);

    _shinobiChart.backgroundColor = [UIColorwhiteColor];

   

     

     SChartLightTheme *theme = [SChartLightThemenew];

     [_shinobiChartapplyTheme:theme];


#4

This should do the trick:

_shinobiChart.borderColor = [UIColor clearColor];

Wait, wrong one. The plot area border is:

// Do this AFTER setting the theme.
_shinobiChart.plotAreaBorderColor = [UIColor clearColor];

// The colors for the x and y axis lines will be from the theme.xAxisStyle.lineColor
// and the theme.yAxisStyle.lineColor properties. 
// The properties in this theme are/appear to be clearColor and you will have to set
// them manually.
xAxis.style.lineColor = [UIColor grayColor];
yAxis.style.lineColor = [UIColor grayColor];

#5

Thanks , that works