Jump to content
Software FX Community

MikeK

Members
  • Posts

    16
  • Joined

  • Last visited

MikeK's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I am assigning the new Y axis to a series but I it is first given the property of inverted before the axis is assigned. So to complete my code snippet provided above: Axis axis = new Axis (); axis.Inverted = true; chart1.AxesY.Add (axis); SeriesAttribues sa = new SeriesAttributes (); sa.AxisY = axis; I have found a work around, but I would prefer if I could remove the hack from my code. Right after the previous segment of code I have: axis.Inverted = axis.Inverted; Not clean, but it gets the chart to load correctly. Thanks, Michael
  2. I have a line chart that has multiple y axes. If I create a new y axis and add it to chart.YAxes and it has the Inverted property set to true it does not show up in the chart as inverted. Below is a short exampe. Does not work: [color= #2b91af]Axis[/color] axis = [color= blue]new[/color] [color= #2b91af]Axis[/color] (); axis.Inverted = [color= blue]true[/color]; chart1.AxesY.Add (axis); It does work on load if I write "chart1.YAxis.Inverted = true;" but this does not fit my needs as I need multiple axes. Any help is appreciated.
  3. MikeK

    Axis Order

    Is there a way to set the order axes appear? For example, if I have 3 Y axes on left of the chart (axis a, axis b, and axis c) and I want the order to be axis c, axis a, axis b, is there a way to accomplish this? Thank you, Mike
  4. I posted about a similar bug back in may May (http://community.softwarefx.com/forums/p/11150/27303.aspx#27303) where if you add a series while zoomed in Chart FX crashes. This crash was fixed in a hot fix but now I have now changed my x axis to DateTime AxisFormat and receive the same crash. Thanks, Michael
  5. I have four series each with ~100 to 150 points. If markers are turned on and I add an annotation it is painfully slow (~ 2.5 seconds). If I turn off the markers and add the annotation it will be added to the chart in a split second. Is there anything I can do to get around this? As a note, I am already using the basic marker template. Any help is appreciated. Mike
  6. MikeK

    zooming question

    I have two zooming questions I have not been able to find the answer to in documentation or the forum: 1) If you have multiple y-axes and you zoom in, is it possible to have only one scroll bar for all of the y axes instead of an individual scroll bar for each y axis? 2) when you zoom in, I noticed that that if you set the minor step, and then you go to move the axis scroll bar, it always can only scroll within the units of the minor step. So if you have a larger minor step (which is a requirment for one scenario), and you zoom in using the stripe zoom and then move the bottom striped zoom area, it is really jurky as it jumps from one minor step to the next. Is there a way to change zooming so the scrolling is not based off the minor step? Thanks, Michael
  7. If I set an axis's logbase to 10 and then try to zoom using either the 'Map' or 'Stripe' ZoomStyle it does not zoom correctly (Stripe Zoom will only have problems if the x axis is set as log 10). For example if I set the y axis to logbase 10 and zoom in using the Map zoom it appears that all of the points are squished at the very bottom of the zoom area. This leads me to believe that the zoom area is trying to use linear distance instead of the logarathimic. Please let me know what needs to be done to get zooming working when I have axes set to log 10. Thanks, Mike
  8. I have a log log plot and I only want lines displayed at the labels location (ex. 10^0, 10^1, 10^2, 10^3, etc.). I have the visibility of the Axis.Grids.Minor set to collapsed. It appears that the lines that are showing up between my labels are considered major grid lines because if I set Axis.Grids.Major.Stroke to a green solid color brush it changes all of the grid lines for that axis to green. How do I set the grid lines for a log log plot so I only see the lines at the label? Thanks, Michael
  9. When I change the visibility, shape, etc. of a series attribute it is not always updating live. To ensure I could reproduce the problem I took the AddiontalAxesAndPanes example provided and added a button to the window.xaml file. Then in the window.xaml.cs file I added the following code: private Visibility _visibility = Visibility.Collapsed; private void Button_Click (object sender, RoutedEventArgs e) { if (_visibility == System.Windows.Visibility.Visible) _visibility = System.Windows.Visibility.Collapsed; else _visibility = System.Windows.Visibility.Visible; foreach (var series in chart1.Series) { series.Marker.Size = 12; series.Marker.Shape = MarkerShape.Circle; series.Marker.Visibility = _visibility; } } When I click the button the markers do not become visible but if I change the date or seperate the panes it does become visible. What do I need to do to ensure the markers are updated when I change the SeriesAttribute.Marker properties. Thanks, Michael
  10. Crash (Note: I can not duplicate this one every time, but it occurs often enough with one x axis and one y axis): 1) Set LogBase on y axis to 10 2) Zoom with map style 3) Error: {"'<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />NaN' is not a valid value for property 'Maximum'."} <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> If it does not crash, if you look in the
  11. MikeK

    axis events

    Thank you for your reply. I would like to implement functionality where if the user mouses over an axis or axis label it will be highlighted and then if the click on the axis or the label I can fire an event to an edit screen (I can already do this for the axis). I was also considering adding the ability if there are multiple y-axes to drag and drop them from the left side to the right and vise versa. Thank you, Michael
  12. MikeK

    axis events

    Right now the only event I see for an axis is MouseClick. Is there any way to determine MouseEnter, MouseLeave and right click on an axis? Also, the MouseClick Event does not include the Axis Title. Is there a way to attach events to the axis title? Thank you, Michael
  13. I have attached the code the will replicate this error. Here are the steps to follow: 1) Click 'Zoom' and zoom in on a portion of the grid 2) Click "Add Series." Notice how the chart is zoomed out even though from the Zoom Stripe (the long skinny chart along the bottom) shows that it is still zoomed in on the same area. This is the first part of the bug. 3) Click the Zoom Stripe selection box (the box that depicts the selected area on the long skinny graph) and move it left and right with the mouse. All of the series disapear and you can not get it to reappear no matter where you scroll to on the chart. --------------------------------XAML----------------------------------------- < Grid> <Grid.RowDefinitions> <RowDefinition Height="20" /> <RowDefinition Height="20" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Button Content="Zoom" Click="Button_Click" Grid.Row="0" /> <Button Content="Add Series" Click="Button_Click_1" Grid.Row="1" /> <cfx:Chart x:Name="_chart" Style="{x:Static cfxmotifs:Simple.Style}" Grid.Row="2"Palette="{x:Static cfx:Palettes.Basic}" MarkerTemplates="{x:Static cfx:MarkerTemplates.Glass}" GalleryTemplates="{x:Static cfx:GalleryTemplates.Glass}"> </cfx:Chart> </Grid> ---------------------------------- C# ----------------------------------------------------------- /// <summary> /// Interaction logic for Window1.xaml /// </summary>public partial class Window1 : Window {public Window1 () { InitializeComponent (); _chart.Gallery = Gallery.Line; _chart.Series.Clear (); _chart.AxesY.Clear (); _chart.AxesX.Clear (); _chart.Zoom.Style = ZoomStyle.Stripe; ObservableCollection<RefPoint> series = new ObservableCollection<RefPoint> ();for (int i = 0; i < 200; ++i) {RefPoint refPoint = new RefPoint (i / 2, i / 10); series.Add (refPoint); } SeriesAttributes sa = new SeriesAttributes (); sa.BindingPath = "Y";sa.BindingPathX = "X"; sa.ItemsSource = series; sa.Content = "Test";Axis axisX = new Axis (); _chart.AxesX.Add (axisX); axisX.Title.Content = "X axis"; axisX.Min = 0; axisX.Max = 100; axisX.Step = 20; sa.AxisX = axisX; Axis axisY = new Axis (); _chart.AxesY.Add (axisY); axisY.Title.Content = "Y axis"; axisY.Min = 0; axisY.Max = 20; sa.AxisY = axisY; _chart.Series.Add (sa); } private void Button_Click (object sender, RoutedEventArgs e) {_chart.Zoom.Mode = ZoomMode.Selection; } private void Button_Click_1 (object sender, RoutedEventArgs e) {ObservableCollection<RefPoint> series = new ObservableCollection<RefPoint> (); for (int i = 0; i < 200; ++i) {RefPoint refPoint = new RefPoint (i / 3, i / 10); series.Add (refPoint); } SeriesAttributes sa = new SeriesAttributes (); sa.BindingPath = "Y";sa.BindingPathX = "X"; sa.ItemsSource = series; sa.Content = "Added Series";Axis axisX = new Axis (); _chart.AxesX.Add (axisX); axisX.Title.Content = "X axis"; axisX.Min = 0; axisX.Max = 100; //axisX.Step = 20;sa.AxisX = axisX; Axis axisY = new Axis (); _chart.AxesY.Add (axisY); axisY.Title.Content = "Y axis"; axisY.Min = 0; axisY.Max = 20; sa.AxisY = axisY; _chart.Series.Add (sa); } } public class RefPoint {public RefPoint (double x, double y) { X = x; Y = y; } public double X { get; set; } public double Y { get; set; }}
  14. UPDATE: To make the problem more apparent and easily happen on the first zoom add the line : axisX.Step = 20; When I read the documentation about step it reads: "Specifies the interval of major tick marks and gridlines on the selected axis. It also controls the gap or interval between labels in the selected axis." I do not believe it should have the functionality where I can not zoom smaller than an interval of the step property. Any help on resolving these issues is appreciated.
  15. I have a couple of problems with zoom for line charts when zoom style 'stripe' is selected. The first problem is that if you zoom in two to three times (for some reason it only takes twice with my real application, but more with the sample app I included below) the chart will zoom out the entire way and then have no x-axis displayed. The second problem, is if this occurs and you try resizing the area to be displayed on the stripe chart it crashes. using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Navigation;using System.Windows.Shapes;using ChartFX.WPF;using System.Collections.ObjectModel;namespace WpfApplication1 { /// <summary> /// Interaction logic for Window1.xaml /// </summary>public partial class Window1 : Window {public Window1 () { InitializeComponent (); _chart.Gallery = Gallery.Line; _chart.Series.Clear (); _chart.AxesY.Clear (); _chart.AxesX.Clear (); _chart.Zoom.Style = ZoomStyle.Stripe; List<RefPoint> series = new List<RefPoint> ();for (int i = 0; i < 200; ++i) {RefPoint refPoint = new RefPoint (i / 2, i / 10); series.Add (refPoint); } SeriesAttributes sa = new SeriesAttributes (); sa.BindingPath = "Y";sa.BindingPathX = "X"; sa.ItemsSource = series; sa.Content = "Test";Axis axisX = new Axis (); _chart.AxesX.Add (axisX); axisX.Title.Content = "X axis"; axisX.Min = 0; axisX.Max = 100; sa.AxisX = axisX; Axis axisY = new Axis (); _chart.AxesY.Add (axisY); axisY.Title.Content = "Y axis"; axisY.Min = 0; axisY.Max = 20; sa.AxisY = axisY; _chart.Series.Add (sa); } private void Button_Click (object sender, RoutedEventArgs e) {_chart.Zoom.Mode = ZoomMode.Selection; } } public class RefPoint {public RefPoint (double x, double y) { X = x; Y = y; } public double X { get; set; }public double Y { get; set; } } }
×
×
  • Create New...