Jump to content
Software FX Community

rob_patterson42@hotmail.com

Members
  • Posts

    10
  • Joined

  • Last visited

rob_patterson42@hotmail.com's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. We are running into troubles with a secondary vertical "Y" axis on the far right side of a line graph that has 2 series of data. There is data dynamically being added to the chart every 5 seconds, giving the perception of a "real time" trend, and as the data values grow the y-axis also changes its values. However, initial y-axis values appear to be "cut off" on the right hand side, and not have enough room to be drawn properly. Eventually, as the values get large enough, the plot area is dynamically resized to allow larger values for the y-axis. Is there a way to set the plot area margins programmatically? Kind regards, Rob
  2. When putting together an small test application to prove the error, I found the fix! I needed to move my "itemSource" binding to above setting the scrollbar view, and moving the secondary axis creation and association to the end of the logic -but after setting the scrollbar view. Thanks for the time, Rob
  3. ...I forgot to add that I often reload the chart listed below, and on each reload I simply clear out the data and redraw the series. And it
  4. I am using the WPF RC1 release and I seem to have issues with the the x-axis scroll bars when a secondary y-axis is added. Below is the code snippet I'm using, and I find that the only place I can successfully add a scrollbar is where it is currently. However, when I access the chart to remove the event handler with from a different application area with access to the chart using simple access such as, chart.AxisX.ScrollBar.Scroll -= new System.Windows.Controls.Primitives.ScrollEventHandler(this.ScrollingEventHandler);, the handler isn't removed properly. What is the correct order of operations to create a chart with a secondary y-axis and add a scroll bar with event handling? SeriesAttributes serData1Time = new SeriesAttributes(); serData1Time.BindingPath = "Data1"; serData1Time.BindingPathX = "ElapsedTime"; serData1Time.Fill = Brushes.Green; TrendingChart.Series.Add(serData1Time); // ********** add scroll bar here ********* TrendingChart.AxisX.ScrollBar.Height = 5.0; TrendingChart.AxisX.SetScrollView(someValue, anotherValue); TrendingChart.AxisX.ScrollBar.Scroll += new System.Windows.Controls.Primitives.ScrollEventHandler(this.ScrollingEventHandler); // secondary yAxis Axis secondaryAxis = new Axis(); secondaryAxis.Position = AxisPosition.Far; secondaryAxis.Foreground = Brushes.Red; secondaryAxis.FontSize = 10; SeriesAttributes serData2 = new SeriesAttributes(); serData2.BindingPath = "Data2"; serData2.BindingPathX = "ElapsedTime"; serData2.Fill = Brushes.Red; serData2.AxisY = secondaryAxis; TrendingChart.Series.Add(serData2); TrendingChart.ItemsSource = TrendData; TrendingChart.AxisX.Max = elapsedTimeMaximum; TrendingChart.AxisY.Max = yAxisMax; TrendingChart.AxesY[1].Max = secondaryYAxisMax; Regards, Rob
  5. Is there a context menu available in the charting control in the WPF RC1 build that are similar to the v7 AJAX charting controls? Regards, Rob
  6. I added an "OnUserScroll" attribute to my charting object in an aspx page, and I added the necessary delegate method in my code behind to catch the AxisEventArgs call. Unfortunately, I don't see the codebehind being called or even breaking on a breakpoint on a scroll event on the aspx page. I'm using VS2008 to test - any thoughts? Regards, Rob
  7. On your corporate site, http://demo.softwarefx.com/chartfx/aspnet/ajaxsamples/, you have an AJAX realtime demo that illustrates the x-axis scrolling once the maximum limit of points appear on the chart series. Can you offer the specific steps that must be followed, and in what order, to duplicate this effect? We are using two series of data, and the data will not start a "0" x-axis value but will need to offer the scrolling "realtime" effect on the x-axis that the demo illustrates. I have the sample code, and already understand the "pointCount" algorithm thats used, and I set the RealTime.Mode = RealTimeMode.Scroll at my max point count. Additionally, I also add my data using BeginAddData( nPoints, RealTimeAction.Append ) and EndAddData( true, true) Your thoughts are appreciated. Rob
  8. Andre, Yes, but when I tried that my initial x-value label was missing/blank. Regards, Rob
  9. My question is concerning a line graph chart with the following sample points: x=9.5, y=14 x=10, y=16 x=10.2, y=21 x=10.9, y=28 x=11.6, y=30 My x-axis displays the following numeric values, using a whole number "step": 9, 10, 11, 12. As a result, the starting value at x=9.5 is not left justified to the y-axis because the starting value on the x-axis is 9. My question is, what methodology can be used to have the "left-most" initial value of the x-axis be 9.5, and the other x-axis values continue with the 10, 11, 12 pattern? Your thoughts are appreciated. Rob
  10. We are using an ObservableCollection<T> of model objects to be the ItemsSource of our charts. However, since our charts are representing "real time" trending as data is arriving, we need to limit the collection to a finite limit. Therefore, once a maximum count is reached -say, 150 objects- the collection acts somewhat like a queue... As more data is added to the "end", the same number of data objects are removed from the beginning of the collection. However, I don't see our charts truncating data from their series, and unfortunately as the data is added the application memory consumption is eventually causing the application to crash. As an FYI, we are adding about 10 points of data every 5 seconds to 6 series spread over 4 charts on one page. This data is added over a period of greater than 24 hrs! Is there a way to "notify" the series that data is removed fom the ObervableCollection of data assigned via the ItemsSource of the charts?
×
×
  • Create New...