Hi,
Is it possible to dynamically resize the bin(column\bar) thickness of a stacked column chart. I am using a composite chart comprising of a stacked column chart and a line chart.
When I resize the column chart using the cursor , my line chart should also get redrawn.request you to kindly help me with the same.
Regards,
Uday
this is a difficult task to create, as it's not exactly a feature of the chart control.
you may need to handle the FillSceneGraph event to get references to the axes using e.Grid["X"] and e.Grid["Y"], casting them to IAdvanceAxis. these objects can then be used to map data values to pixel locations or vice-versa, using the axis' Map and MapInverse functions.
in the MouseDown event, you can use the chart's HitTest method to get the Box primitive in that position and make changes to the chart's data accordingly. if you want to change the size or position of the Boxes, you can use FillSceneGraph or the ChartDrawItem event for that.
good luck and let us know if you run into problems.
Hi David ,
Actually I have not asked you the proper question.What I need to do is create a box primitive on top of my chart dynamically based on the click and drag events. Also I should be able to select and resize the primitive.
Please find attached the files which contain a scree shot of my requirement. I would request you to kindly provide me a sample code as I am new to this component.
It looks like you've asked this specific question in a separate thread:http://forums.infragistics.com/forums/t/14731.aspx
I don't myself know how one would accomplish this. I'm simply pointing out the separate thread to help avoid some confusion later.
Yes, I have already asked this question in a seperate thread. Actually I had posted the thread later once I got some clarification on the requirement.
I was trying to accomplish the task using primitives but I am not very sure as to How to handle the mouse events.
Request you to kindly help me out with the same.
unfortunately i can't provide sample code for this, as it would take several hours to figure out the right solution, and i am working on another development deadline. i've never created this sample in the past; i can only say that i believe it's possible. make sure you check out the interaction samples and custom Layer / FillSceneGraph samples in the winchart samples browser.
and feel free to ask here if you have more specific questions along the way.
Hi David,
I saw the sample related to dragging a graph line. I am creating a box primitive on top of a stacked column chart. How can drag the bounds of the box primitive to resize the bounds?
Please help as I dont have much time I need to finish this task.
thanks and Regards,
Uday.
i don't think it will be as simple as the line chart dragging sample. you will need to handle the MouseDown event, evaluate if your box's edge was clicked, Invalidate during the MouseMove or MouseUp, and change your FillSceneGraph event handler to draw the box using your new calculated bounds.