Jump to content
Software FX Community

JuanC

Staff
  • Posts

    863
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JuanC

  1. JuanC

    XPS Serialization

    We have fixed this issue on our internal builds although you will need an additional line of code for charts that won't be displayed on the screen but only used for XPS generation. chart.AdvancedSettings |= ChartSettings.RenderBeforeLoad;Send an email to support at softwarefx dot com if you want to test this before it is released. Regards, JuanC
  2. We fixed a couple of issues in how we handle TimeSpan. The hotfix for RC1 should be available tomorrow (build 3408 or later) here Note that with the update you do not need to set the CustomFormat to hh:mm:ss as it is the default (I am guessing you were setting it because of an issue where we generated empty labels). JuanC
  3. The approach to get the value of each series depends on how are you passing the data to the chart - Is the X axis showing dates? - Are you using a gallery that supports X values? e.g in a line chart with points on the following dates: Jan 1, Jan 2 and Jan 18, the distance between the first 2 points will be smaller than the distance between the second and third point. Regards, JuanC
  4. We have been working on serialization for some time on 2 approaches 1) saving and loading from XML. Note that this approach does not serialize the chart data, also because of WPF limitations, if you provide user defined data templates (to style how the bars are painted for example) this will not work as bindings will be lost. This is accomplished using the Export/Import methods. 2) a Clone method, this method uses the XML serialization but transfers the data as well as any user data templates. We also have some optimizations to make sure data does not have to be reprocessed. The clone method is used internally on our zoom code. Please let us know if this works for you. Regards, JuanC
  5. JuanC

    How to use Zoom?

    Zoom (and Scroll) is one of the areas where we are actively working on. Because of this we will separate Magnifying from the other zoom modes. This will allow using the magnifier after zoom has been applied and will allow us to clean up the API. In future builds to turn on the magnifier you will need the following code chart1.Zoom.Magnifier.IsEnabled = true; We apologize in advance for the inconvenience but this is a change we felt would improve the product significantly. If you are interested in testing our newer builds please send a message to wpf at softwarefx dot com. JuanC ChartFXWPFTest15.zip
  6. JuanC

    How to use Zoom?

    Please try invoking the code that sets the Zoom mode in the Page/Window loaded event instead of the Page/Window constructor. We will try to fix this in future builds but in the meantime setting the Zoom mode in the Loaded event should work as expected. JuanC
  7. JuanC

    License

    Please send a message to wpf at softwarefx dot com JuanC
  8. Another way to remove the need for scrollbar might be to 1) Adjust the font size used by the legend 2) Change the legend box layout to accomodate 2 columns <cfx:Chart.LegendBox> <cfx:LegendBox> <cfx:LegendBox.ItemsPanel> <ItemsPanelTemplate> <UniformGrid Columns="2"/> </ItemsPanelTemplate> </cfx:LegendBox.ItemsPanel> </cfx:LegendBox> </cfx:Chart.LegendBox> Regards, JuanC
  9. JuanC

    Z-Axis

    We have considered this but decided not to do so because we felt customers needing to create XYZ scatter charts would also require other scientfic functionality (e.g. plotting 3D surfaces from a collection of XYZ points, plotting mathematical functions, etc.) Can you expand on how you would use a 3D scatter chart and what other features you would need? Regards, JuanC
  10. To prevent customgridlines to appear in legend box chart1.LegendBox.ItemAttributes[chart1.AxisY.CustomGridLines].Visibility = Visibility.Collapsed; Regards, JuanC
  11. It is hard for us to comment without knowing more about your case. If you do not want to post additional info, please send a sample app to wpf at softwarefx dot com that reproduces the issue. JuanC ChartFXWPFTest14.zip
  12. JuanC

    Movable Series?

    Your code works but the AttachX and AttachY use "logical" axis values and not pixels. This means that if you do SetAttachX(r, 10), your rectangle will only be visible if you have more than 10 data items in your chart. If your chart is an XY chart then it will be visible if value 10 is visible in your X axis. The same applies for AttachY if your Y axis goes from 0 to 5 then the rectangle will be clipped. JuanC
  13. JuanC

    How to use Zoom?

    Have you tried moving your mouse over the magnifier after it appears? Can you post/send a small sample that reproduces the bug where we do not track the mouse movements? Regards, JuanC
  14. JuanC

    Movable Series?

    I would suggest that instead of series you consider using Annotation objects to implement your trend lines. This will also allow you to implement drag&drop as you can attach easily to Mouse events on any visuals you add as anotations. Regards, JuanC
  15. To fix this issue please remove the FromOpen="True" from both RangeCondition elements. When FromOpen is true we do a greater than comparison, instead of a greather than or equal comparison. The default for BindingPath is the value being plotted so you can remove BindingPath="Y" as well. Regards, JuanC
  16. All my answers in this thread apply to ChartFX for WPF. I would suggest you post your question in the ChartFX for Java forums. JuanC
  17. About the order of the series in the legend box: We normally show the first series on top, the only case where we switch it is on a Stacked chart. This is a popular request because in a stacked chart the first series is usually on the bottom of the bar/area. About the layout of the legend box: We use a StackPanel by default but if you want multiple columns you could use a UniformGrid or any other custom built panel that generates the desired layout. Note that because we add the items automatically to the panel, you need to use a panel such as UniformGrid that does not need additional attached properties on each element (e.g. you cannot use Grid as it depends on Grid.Row and Grid.Column). <cfx:Chart.LegendBox> <cfx:LegendBox> <cfx:LegendBox.ItemsPanel> <ItemsPanelTemplate> <UniformGrid Columns="2"/> </ItemsPanelTemplate> </cfx:LegendBox.ItemsPanel> </cfx:LegendBox></cfx:Chart.LegendBox>Regards, JuanC
  18. Templating/Styling is not the solution as the series colors are actually bindings (they are no hardcoded in the templates). The best way to go is ConditionalAttributes. JuanC
  19. JuanC

    Support for x64

    Yes, being a native .NET control means we are x64 compatible. Also most of our development and test team is already using x64. Regards, JuanC
  20. JuanC

    Partial trust

    After build 2543 we have made several changes to our default styles, some of those changes include the use of bitmapeffects which do not work in low trust. You should modify the reference in your project to ChartFX.XBAP.dll, because you were using a very old version it is likely that some API have changed. Regards, JuanC
  21. I apologize as I did not focus on the Y data because I thought you were clipping the X axis. The easy fix for your scenario is to also set the AxisY.Min to 0. This should give you the right data in Y. Also you want to set the AllSeries.StackedStyle property to Stacked.Normal and you do not need to set each series Stacked property to true. chart.AllSeries.StackedStyle = StackedStyle.Normal;Please note that you are mixing stack with X values and we will not try to sync X values to stack, e.g. if you include a DataPoint in points1 for 2/15 we will not try to stack 3/1 against 3/1. Even if you can ensure both collections have the same number of points and the dates match please note that if you add points for 1/1/08, 2/1/08, 3/1/08 and 5/1/08, we will draw the point for 5/01/08 at twice the distance than the distance between 3/1 and 2/1 If your dates are not equally spaced but you want the X axis to be equally spaced then you will have to set the data on a global basis instead of per-series, e.g. IList<DataPoint> points = new List<DataPoint>();points.Add(new DataPoint { Date = DateTime.Parse("1/1/2008"), Price = 1, Price2 = 1 });points.Add(new DataPoint { Date = DateTime.Parse("2/1/2008"), Price = 4, Price2 = 2 });points.Add(new DataPoint { Date = DateTime.Parse("3/1/2008"), Price = 2, Price2 = 1 });points.Add(new DataPoint { Date = DateTime.Parse("5/1/2008"), Price = 2, Price2 = 1 });SeriesAttributes series0 = new SeriesAttributes();series0.BindingPath = "Price";SeriesAttributes series1 = new SeriesAttributes();series1.BindingPath = "Price2";chart.Series.Add(series0);chart.Series.Add(series1);chart.AxisX.Labels.BindingPath = "Date";chart.ItemsSource = points;This assumes that you can mix in one CLR object the data for both series. Regards, JuanC
  22. How is this chart being serialized? i.e. what serialization method are you using? Regards, JuanC
  23. In a pie chart the entries shown on the legend correspond to the X axis, so if you wanted to hide them you would write chart1.LegendBox.ItemAttributes[chart1.AxisX].Visibility = Visibility.Collapsed;Or if you want to hide the legend box completely chart1.LegendBox.Visibility = Visibility.Collapsed; Regards, JuanC
  24. In a pie chart we use the collection of X axis labels, please also note that DataUnit has implicit converters for doubles and dates so you do not need to manually create them. LabelCollection axisLabels = chart.AxisX.Labels.Items; for (int i = 1; i <= 10; i++) { chart.Data[0, i - 1] = i; axisLabels[i - 1] = "P" + i.ToString(); } Regards, JuanC
  25. JuanC

    Partial trust

    Are you trying to use ChartFX.XBAP.dll? Do you get the ReflectionPermission exception on any chart you have tried to build? JuanC
×
×
  • Create New...