This is currently my code:
private void AddEventTimeOverlay()
{
ValueOverlay overlay = new ValueOverlay();
CategoryDateTimeXAxis xaxis = (CategoryDateTimeXAxis)MChart.Axes.First((axis) => axis.Name.Equals("SharedXAxis"));
overlay.Axis = xaxis;
double scaledx = xaxis.GetScaledValue(eventTime.Ticks, MChart.WindowRect, GetViewportRect(xaxis));
overlay.Name = "EventTimeOverlay";
overlay.Value = scaledx;
overlay.Thickness = 2;
overlay.Brush = new SolidColorBrush(Colors.Magenta);
//overlay.Axis = (NumericYAxis)MChart.Axes.First((axis) => axis.Name.Equals("SharedYAxis"));
//overlay.Value = 0.21;
//overlay.Thickness = 2;
//overlay.Brush = new SolidColorBrush(Colors.Purple);
MChart.Series.Add(overlay);
}
private Rect GetViewportRect(Axis axis)
double top = 0;
double bottom = axis.ActualHeight;
double left = 0;
double right = axis.ActualWidth;
double width = right - left;
double height = bottom - top;
if (width > 0.0 && height > 0.0)
return new Rect(left, top, width, height);
return Rect.Empty;
For some reason, no overlay is showing up for me. I'm not sure if the problem is the DateTime to Double value conversion, or if there's something else going on. When I try to display a horizontal valueOverlay, it shows up fine (I tested using the code that is commented out).
Suggestions?
Hello,
At this time this has not yet been implemented.
Last year we migrated to a new product ideas site that allows customers to communicate directly with product management about the ideas. Due to the volume of ideas that we had in existing systems the existing ideas were not ported to the new site and it is recommended that you add this idea to the new site so that you can communicate directly with product management on it and also allow others in the community to vote on it.You can submit ideas here:http://ideas.infragistics.com/There are many benefits to submitting a product idea:• Direct communication with our product management team regarding your product idea.• Notifications whenever new information regarding your idea becomes available.• Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.• Allow you to shape the future of our products by requesting new controls and products altogether.• You and other developers can discuss existing product ideas with members of our Product Management team.Steps to create your idea:1. Log into the Infragistics Product Idea site at http://ideas.infragistics.com/ (creating a new login if needed).2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)3. Add your product idea and be sure to be specific and provide as much detail as possible. Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!Let me know if you have any questions with this matter.
It's been almost a year, is this feature implemented now?
Hello Guy,
I have sent your Product Idea (ValueOverlay for CategoryDateTimeXAxis) directly to our product management team. Our product team chooses new Product Ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested ideas, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your idea is chosen for development, you will be notified at that time. Your reference number for this Product Idea is PI13060093
If you would like to follow up on your Product Idea at a later point, you may contact Developer Support management via email. Please include the reference number of your Product Idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Are there any updates regarding this issue?
We are currently using the method suggested in the post (Drawing a Rectangle everytime a size_changed event was raised)
and we believe it has a lot of overhead.
Do you think you will be able to add this to the built in functionality of ValueOverlay?
(Drawing a rectangle on XDateTime axis)?
Thank you in advanced,
Guy.
Thank you for your post. I have been looking into it and I can say that the ValueOverlay can be used only with NumericXAxis, NumerixYAxis, NumericAngleAxis and NumericRadiusAxis. Here you can read more about this:
http://help.infragistics.com/NetAdvantage/WPF/2012.1/CLR4.0/?page=xamDataChart_Series_Value_Overlay.html
Also you can see this forum thread:
http://forums.infragistics.com/forums/p/70620/357469.aspx#
Where it is explained how to achieve the same functionality on other types of Axes.