0

I am using BEMSimpleLine graph in my IOS application. I want to change the graph colour in some selected areas. Means, currently the graph colour is blue, and from x-axis point 5 to point 10, I want to make it green colour. The rest of the other graph areas should be in blue colour only. How can i do this?

Current Graph Image

enter image description here

Required Graph Image

enter image description here

itzmebibin
  • 9,199
  • 8
  • 48
  • 62

1 Answers1

0

Set the areaBaseValue and areaFill properties. The base value is the lower boundary of the filled area. This is normally set to the location value of the yRange so that the fill starts at the bottom of the plot area, but it doesn't have to be. The fill can be any CPTFill—a solid color (with optional transparency), an image, or a gradient. For example:

plot.areaFill = [CPTFill fillWithColor:[CPTColor redColor]];

plot.areaBaseValue = CPTDecimalFromInteger(0);
itzmebibin
  • 9,199
  • 8
  • 48
  • 62
Sanjukta
  • 1,057
  • 6
  • 16