Dear Infragistics Team,
i think my questions are related with "CrosshairLayer which handles the data annotations that follow the mouse" please i really appreciate your help:
1) I wanna resize the markers on the scatter lines series (in the ultradatachart i wanna make bigger makers)
2) I wanna highlight the points inside the chart with movement mouse event (when the crosshair lines pass throught the points chart, the point chart hightlight).
can you helpme on vb.net sample?. I really appreciate your help.
Sincerily,
Pedro Salvador
Hi Pedro,
Thank you for posting in our forums.
The chart doesn’t have the capability to resize markers or highlight them out of the box. However what you can do in this case is to use a BubbleSeries with the same X and Y values as the ScatterLineChart and then specify the size of the bubbles by using the RadiusMemberPath property. In that case the bubbles will be the markers of the scatter line chart with a size determined by their radius property. As for the highlighting, you can use the FillScale property of the BubbleSeries. Create a ValueFillScale and set its minimum value and maximum value to 0 and 1 respectively. Add two brushes to the scale for the normal and highlighted colors. Then add a fill member in your data source and set all initial values to 0. Then in the SeriesMouseEnter event set the fill property of the item to 1, instead of zero. This will make the item have the highlighted color. Then in the SeriesMouseLeave event set its value back to 0.
I have attached a sample which demonstrates this suggestion.
Please let me know if you have any additional questions.
Dear Dimitar,
Thank you so much for answer me. I wanna reply the event that you have on your website on this page: http://labs.infragistics.com/silverlight/Showcases/Stocks/
The event i wanna reply is the crosshair lines pass throught the chart, the point follows the the crosshair, please. Can you helpme with a vb.net example?
Please i really need help with that.
Hi Salvador,
Thank you for the reply.
This can be achieved with the chart annotation layers. By adding a chart annotation layer you can easily create a similar chart. You need to use a CategoryHighlight, CategoryItemHighlight, CategoryTootlip layers in order to show the moving line, marker and tooltip in the chart. For more information about these layers, please see this link:
http://help.infragistics.com/Help/Doc/WinForms/2015.2/CLR4.0/html/DataChart_ChartAnnotationLayers.html
I have modified my sample in order to demonstrate this suggestions.
Thankyou so much for answerme, i have another question, please, can you helpme?.
I create the function that attached below, but throws a error : "a type " infragistics.portable.rect " value can not be converted into " System.Drawing.Rectangule ". The function shows on a label the coordinate X, Y on the chart. please, can you helpme with the mistake?. I write on the code where is the error.
Private Sub UDCObject_MouseMove(sender As Object, e As MouseEventArgs) Handles UDCObject.MouseMove ' gets the series and if nothing exits the sub Dim Series As ScatterLineSeries = Me.UDCObject.Series(0) If Series Is Nothing Then Return End If ' gets the axes and if any of them is nothing exits the sub Dim XAxis As NumericXAxis = DirectCast(Series.SeriesViewer, UltraDataChart).Axes.OfType(Of NumericXAxis).FirstOrDefault() Dim YAxis As NumericYAxis = DirectCast(Series.SeriesViewer, UltraDataChart).Axes.OfType(Of NumericYAxis).FirstOrDefault() If XAxis Is Nothing Or YAxis Is Nothing Then Return End If ' Get the actual X and Y values form the mouse current position and put the result in the label Dim Viewport As System.Drawing.Rectangle = Series.ExportVisualData().Viewport '!!!!!!*************Here is the error********!!!!!!!!! Dim Window As System.Drawing.Rectangle = Series.SeriesViewer.WindowRect Dim IsInverted As Boolean = XAxis.IsInverted Dim Param As ScalerParams = New ScalerParams(Window, Viewport, IsInverted) Dim UnscaledX = XAxis.GetUnscaledValue(e.Location.X, Param) IsInverted = YAxis.IsInverted Param = New ScalerParams(Window, Viewport, IsInverted) Dim UnscaledY = YAxis.GetUnscaledValue(e.Location.Y, Param) Coordinates_UDC1.Text = String.Format("X={0:0.00} Y={1:0.00}", UnscaledX, UnscaledY) End Sub
I'll hope you can helpme again. Please Dimitar
Sincerily
I am attaching a modified version of my sample, which uses 8000 data points along with the highlight and tooltip chart layers. Note that using a numeric data for the category axis is just the same as using any other data. The chart will simply use the data class’ ToString method to determine the X axis labels.
Let me know if you have any additional questions.
Thankyou so much for your answer. Regarding your comment "try to convert your scatter series to a category one". Can you helpme with a sample with a category chart (scatter line) If i use the category one, the events "higliht", "tooltips" are possibles?. The idea is to create a graph with 8,000 in real data time. The spacing doesn’t matter. Can you helpme please with a sample on vb.net, please Dimitar?
Pedro
Unfortunately it seems that even though you can compile your solution with these layers even when you are using a scatter chart, they won’t work with it. At this point you have two options – either log a new product idea for highlight layers for scatter series form our product ideas site or try to convert your scatter series to a category one. This is possible if the intervals on one of the axis are equally spaced or their spacing doesn’t matter.
I'm sorry to bother again, but i can't reply the – the tooltip and the item highlight with the scatter data. Do you have any sample on vb.net with scatter line and real data binding. I'm binding like 80000 thounsand points. Can you helpme with the events, please Dimitar?. I really appreciate your help.
Sincerly
The numerical axes don’t support highlight layers, so you will need to remove the code for the CategoryHighlightLayer:
‘Dim categoryHighlight As New CategoryHighlightLayer()
‘categoryHighlight.TargetAxis = xAxis
‘categoryHighlight.BandHighlightWidth = 2
‘categoryHighlight.Thickness = 0
‘categoryHighlight.Brush = SerieImagen.ActualBrush
‘categoryHighlight.TransitionDuration = 1000
‘categoryHighlight.TransitionInDuration = 1000
This layer can be used only for category axes. Still the other two layers – the tooltip and the item highlight – should work properly so you can use them with your scatter data.