Hi,
in my app, I have an ultrachart (ScatterLineChart) and an ultragrid. I like to use the ultragrid as a navigation control: when I select a datarow in the ultragrid, I like to
1) scroll the according datapoint in the ultrachart into view
2) show the tooltip on the according datapoint in the ultrachart.
I must admit, that I am quite a beginner in the UltraChart stuff, so the solution might be quite simple, so my question: Is this possible and how to do this?
Thanks in advance.
Hello,
Can I be of any further assistance?
Scrolling/Scaling are normally enabled and disabled together. You can use the following method to disable just the scaling:
In the event handler for ChartDrawItem, make sure that the plus and minus buttons aren't visible.
if (e.Primitive.Path == "Border.Title.Grid.X.ScrollBar.Scale.Plus" ||e.Primitive.Path == "Border.Title.Grid.X.ScrollBar.Scale.Minus") e.Primitive.Visible = false;
In addition, you will need to cancel the chart's scaling event.
Please let me know whether this solution works for you or if you require any further assistance.
Thanks for the example, but I think it contains a bug.
When you first select a row in the grid, the chart jumps to the required position.
But when you then zoom in on the chart by pressing and holding the + sign, you see the boxannotation move over and out of the screen.
Is there a way to disable the +- sign on the scalebar? Remark : scrolling must stay but scaling can only be done in code.
Thanks
I have uploaded a more complete sample. In this sample, clicking on an item in the grid will scroll the chart so that the corresponding chart item is in view.
Tooltips are always displayed at the location of the mouse cursor, so I opted to use an annotation instead. At the same time that the chart item is scrolled into view, the annotation will be placed at the location of that chart item (with a small offset).
Thank you for your patience while I built this sample. Please let me know if there is anything further that I can do to assist you.
I am currently researching the chart to determine whether this can be accomplished. I will follow up on this post when I have reached the solution.