Area Graph
-
- Newbie
- Posts: 58
- Joined: Thu Jul 05, 2012 12:00 am
Area Graph
Trying to achive a graph as per sample, I have tried an area graph, but I only have 1 value for each response, so all I get is all in the left hand column, I need to fill the area 100%, so was thinking the area graph is what is needed
- Attachments
-
- area.jpg (36.07 KiB) Viewed 5992 times
Re: Area Graph
Hello miethelad,
Sorry for the delay. I think should be useful for you, use a customBarSeries as do in the example of Demo All Features\Welcome !\Chart styles\Standard\Bar\Bar Size example. As you see in this example is used a custom series to change the size of Bars. I have made a simple project where try to achieve as you want using a CustomBarSize class and changing the size and positions of Bars. Can you tell us if previous code works as you expect?
I hope will helps.
Thanks,
Sorry for the delay. I think should be useful for you, use a customBarSeries as do in the example of Demo All Features\Welcome !\Chart styles\Standard\Bar\Bar Size example. As you see in this example is used a custom series to change the size of Bars. I have made a simple project where try to achieve as you want using a CustomBarSize class and changing the size and positions of Bars. Can you tell us if previous code works as you expect?
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 58
- Joined: Thu Jul 05, 2012 12:00 am
Re: Area Graph
Thanks, your demo worked fine apart from can't see how the invert works as this did not work, I have added my 3 of my values to the data, but is not right, see attached
- Attachments
-
- graph.JPG (61.58 KiB) Viewed 5895 times
Re: Area Graph
Hello mikethelad,
I have made a simple code to adapt the bars at your values:
Can you tell us if previous code help you to achieve as you want? As you see you need modify the Xvalue to adapt your data.
Thanks,
I have made a simple code to adapt the bars at your values:
Code: Select all
CustomBarSize bar1, bar2, bar3;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
bar1 = new CustomBarSize(tChart1.Chart);
bar2 = new CustomBarSize(tChart1.Chart);
bar3 = new CustomBarSize(tChart1.Chart);
bar1.Add(1, 100, "16.3%", Color.Black);
bar2.Add(2, 100, "60.3%", Color.Blue);
bar3.Add(3, 100, "0.4%", Color.Red);
bar1.SideMargins = false;
bar2.SideMargins = false;
bar3.SideMargins = false;
bar1.SizeValues[0] = 1.63;
bar2.SizeValues[0] = 6.3;
bar3.SizeValues[0] = 0.04;
bar1.XValues[0] = 0;
bar2.XValues[0] = 2;
bar3.XValues[0] = 5.1;
tChart1.Axes.Bottom.Labels.Style = AxisLabelStyle.Value;
tChart1.Axes.Bottom.SetMinMax(-2, 5.2);
tChart1.Axes.Bottom.Increment = 1;
tChart1.Axes.Bottom.MinimumOffset = 1;
tChart1.Axes.Bottom.MaximumOffset = 1;
}
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 58
- Joined: Thu Jul 05, 2012 12:00 am
Re: Area Graph
I can see how the below are done, and can do formula:-
bar1.SizeValues[0] = 1.63;
bar2.SizeValues[0] = 6.3;
bar3.SizeValues[0] = 0.04;
The XValues I can't work out,
bar1.XValues[0] = 0;
bar2.XValues[0] = 2;
bar3.XValues[0] = 5.1;
The graphs will have vary number of columns, from 2 upto 9
bar1.SizeValues[0] = 1.63;
bar2.SizeValues[0] = 6.3;
bar3.SizeValues[0] = 0.04;
The XValues I can't work out,
bar1.XValues[0] = 0;
bar2.XValues[0] = 2;
bar3.XValues[0] = 5.1;
The graphs will have vary number of columns, from 2 upto 9
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Area Graph
Hi mikethelad,
You could do something as in the All Features\Welcome !\Chart styles\Standard\Area\Sales vs. Price example in the features demo where Area series is being used.
You could do something as in the All Features\Welcome !\Chart styles\Standard\Area\Sales vs. Price example in the features demo where Area series is being used.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |