[DEMO] Charting with ReportControl |
Post Reply |
Author | |
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Posted: 21 March 2011 at 9:37am |
Hi,
This is exactly what I needed and maybe usable for other members as well
My original idea was to have a legend that would be scrollable because I have a lot of 'items' added to the ChartControl and you all know that's a PITA... The more items you have, the smaller the area gets to render the chart. I knew I needed Markup to get the legend
drawn so I had two options, the CJ PropertyGrid control and the ReportControl. I chose the ReportControl (because this is still my favorite control hehehe) and while I'm trying to implement it I came up with the idea using the RC as data for the Charts.
Using RC for this I have following options at my disposal
Heeee I have DrawItem event as well... If I'm not mistaken ChartControl has PrintToDC hDC .... method. Yes, could use that to render a chart into a ReportItem. That's when this DEMO came to 'life' I had reanimate it a few times and currently it's going a little better, only artificial respiration is needed And who knows this will be solved (read: IMPLEMENTED ) by one of the CJ developers.There are a few known problems, most of them I commented but if there are more, I would like to know it as well. So, if you would run into a problem or have an idea (or two), you could use this post to discuss it. The code is a bit messy but hey!!!, it's a DEMO, right? If someone feels like putting it all into a reusable class, be my guest
This DEMO is mostly to keep the CJ developers awake In my opinion this would be THE implementation of the year. It isn't hard as you can see in the code, just plain old VB code. You don't have to be a rocket scientist to understand it. Commented most of the code, so...
Following options are included in the DEMO:
edit: You can't use 3D charts to render chart in ReportControl because .PrintToDC isn't implemented (yet)
That's about it, maybe you have suggestions or ideas that could be used to enhance this demo, so feel free to reply in this post.
Here it is...
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Nice demo!
One thing that the demo illustrates (IMHO) is the ability to set the vertical and horizontal alignment of a chart. For example, it would nice to be able to align the pie chart to the top of the available space rather than the middle. I have a similar issue with one of my projects where I would like the pie chart to be aligned to the left of the available space rather than the center. A minor issue, but it would still be nice to have control over the chart alignment. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |