Author |
Topic |
Kurmanc
Yak Posting Veteran
92 Posts |
Posted - 2011-10-10 : 05:10:26
|
Hi,I have a Chart Report Item of type Column. In this chart I have four fields, lets say A, B, C and Total.Field Total is the sum of A, B and C.By default the fields A, B, C and Total are drawn side by side (CustomAttributes - DrawSideBySide - Auto). However, I want only field A, B and C to be drawn side by side and field Total to stretch over all those fields. What I did was to set the PointWidth=2 for Total and 0.8 for the other fields. Then I set DrawSideBySide=True for field A, B and C, and DrawSideBySide=False for field Total. This does not work because as long as one field has DrawSideBySide=False then all other fields follow this setting even though I set DrawSideBySide=True for field A, B and C.What am I doing wrong? |
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-10-10 : 06:56:34
|
Maybe you need to create a separate chart series just like you do when you have several lines in a line chart...?- LumbagoMy blog-> http://thefirstsql.com/2011/07/08/how-to-find-gaps-in-identity-columns-at-the-speed-of-light/ |
|
|
Kurmanc
Yak Posting Veteran
92 Posts |
Posted - 2011-10-10 : 07:20:52
|
Lumbago,I think your suggestion might work. I'll give it a try.I saw that it is possible to add as many "chart areas" you want. So I think I will have Chart Area 1 with fields A, B, C, and Chart Area 2 with field Total.Then I can probably DrawSideBySide=False for field Total. And hopefully I will see the result as I wish. |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-10-10 : 07:31:33
|
good luck - LumbagoMy blog-> http://thefirstsql.com/2011/07/08/how-to-find-gaps-in-identity-columns-at-the-speed-of-light/ |
|
|
Kurmanc
Yak Posting Veteran
92 Posts |
Posted - 2011-10-10 : 08:53:39
|
Lumbago, it worked with your proposal as a base and with help of some ugly modifications on top of that :)SOLUTION:1. Create Chart and add all your fields i.e. A, B, C, Total (The chart area has name Default at creation)2. Add A, B, C again (i.e. so you have a copy of them) and rename them to A2, B2, C23. Add two more chart areas; Chart Area1 and Area2 (with background color = No Color)Then do the following:1. Select field A, set ChartAreaName to Area2, set DrawSideBySide=True, and PointWidth=1.5. Do the same for field B and C.2. Select field Total, set ChartAreaName to Area1, set DrawSideBySide=False, and PointWidth=2.3. Select field A2, set ChartAreaName to Area1, set DrawSideBySide=False and PointWidth=1.5. Change colour for field A2 to "No Color" (make it "invisible"). Do the same for field B2 and C2. |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-10-10 : 09:03:22
|
Wow, excellent. Sounds like a serious hack but if it works..nice job! :) Would have been interesting to see what it looks like as well, I have to admit that I can't really visualize it completely...maybe you could upload a screenshot to tinypic.com or something?- LumbagoMy blog-> http://thefirstsql.com/2011/07/08/how-to-find-gaps-in-identity-columns-at-the-speed-of-light/ |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-10-11 : 02:21:49
|
This is kind of what I imagined but I was curious of how it actually looked because I didn't quite understand how you would stack them on top of each other. If all graphs had positive values it wouldn't work so well I imagine since there is no transparency (at least not to my knowledge). Wouldn't it look better to have the total as a line though? In front of the a/b/c-columns?- LumbagoMy blog-> http://thefirstsql.com/2011/07/08/how-to-find-gaps-in-identity-columns-at-the-speed-of-light/ |
|
|
Kurmanc
Yak Posting Veteran
92 Posts |
Posted - 2011-10-11 : 02:52:15
|
Lumbago, Here is the final version of the graph..it took me some time to get it work with a line in the middle (i.e. x/y-axis = 0).To make the horizontal line pass through all chart areas I had to create a third area being on top pf area1 and area2. So I created a third chart area having additional copy of field A, B, C, Total. All having "No Color" with CustomAttribute - PointWidth set to 1.8 for field A, b, C and 2.0 for Total. Then I had to insert a StripeLine for Area3 to get the horizontal line.You can insert the StripeLine by selecting the chart y axis and then from Properties click StripeLines and then set BorderStyle to Solid. It makes it easier to select the correct Y axis by setting the CustomAttributes for Area3 by having Left, Top and Width different from Area1 and Area2.By the way as you can see field A and C have a negative value. |
|
|
|