Jump to content
Software FX Community

JuanC

Staff
  • Posts

    863
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JuanC

  1. Can you provide a sample app that reproduces this crash? JuanC
  2. The bug is related to the fact that after removing a series from the chart, when using per-series data, we might keep our connection to certain event handlers. It has been fixed on build 3883. JuanC
  3. I copied your code "as is" and it worked fine, i.e. the chart got updated properly. Please check the version of ChartFX.WPF.dll that you are using and/or download our most recent hotfix/service pack. If you are using recent bits it might be necessary to reproduce the problem in a small standalone app so that we can test it here, as it might be related to other properties/state of the control. JuanC
  4. Unfortunately the ListTransform will not help you in the chart you are trying to achieve, the list transform should only be used when you have a list of X and each X will be represented by a different series. Note that if you could have the data like this public class MyData { public string Country {get;set;} public string Year {get; set;} public double Value {get;set;} } You could use the CrossDataTransform to create either a chart with countries in the X axis and as many series as Years or viceversa, years in the X axis and as many series as countries. JuanC
  5. Although I agree that the z order of the markers should be higher, it is not a change we feel confident adding in a hotfix. Also the vertical lines appear because our code sees a change in a parameter (even though is only marker related) so it "breaks" the paint of the area, the vertical line is the border of the area, you can imagine this more easily if you think what would happen if you change the fill color for all points higher than 5. To overcome these limitations you might want to try adding extra series that will contain the markers and make sure they are drawn on top of the area, e.g. chart1.Gallery = Gallery.Area; chart1.AllSeries.StackedStyle = StackedStyle.Normal; chart1.Series.Add(new SeriesAttributes("Field1")); chart1.Series.Add(new SeriesAttributes("Field2")); // Now repeat series as lines so that they appear on top of area // Note that the first one should not be stacked SeriesAttributes series1Line = new SeriesAttributes("Field1"); series1Line.Stacked = false; series1Line.Gallery = Gallery.Scatter; // Setting content to an empty string will cause element to be skipped for // legend window but you will need hotfix 3882 or later series1Line.Content = ""; chart1.Series.Add(series1Line); SeriesAttributes series2Line = new SeriesAttributes("Field2"); series2Line.Stacked = true; series2Line.Gallery = Gallery.Scatter; series2Line.Content = ""; chart1.Series.Add(series2Line); JuanC
  6. This has been fixed AFAIK in build 3880, please make sure you check the file version before retesting your app. JuanC
  7. We have added support for object properties in build 3880. Unfortunately we do not have a way right now to provide stand-alone executables so I would suggest using our update site from a personal machine where you can control the browser and settings. After updating a separate machine it would just be a matter of copying all DLL files. If you send a message to support we can provide a zip file but if future hotfixes are required it would be better if you could pick them up directly. JuanC
  8. We have fixed the issues related to ListTransform and your test project in build 3880. JuanC
  9. Using a different style (Basic, Simple) would significantly reduce that empty space. Have you actually tried any of these styles? JuanC
  10. Unfortunately at the moment we do not have such a link for WPF, I will forward this to our web guys to suggest they create a similar resource for WPF, there are some WPF samples here but it is not an exhaustive list. I can tell you that we do not support the following galleries from your list 3D Spline Area 3D Stacked Spline Area 3D Candlestick 2D Surface (you could create a 3D surface and rotate so that the camera is on top and disable further rotations though). Regards, JuaNC
  11. No, other than UseEffects there is no way to further customize the default glass effect other than writing your own templates/styles. Also note that you can mix and match the style for the chart as a whole, the markers and gallery templates, border and palette, e.g. chart1.Style = ChartFX.WPF.Motifs. Simple.Style;chart1.GalleryTemplates = ChartFX.WPF.Motifs.Glass.GalleryTemplates;chart1.MarkerTemplates = ChartFX.WPF.Motifs.Glass.MarkerTemplates;chart1.Border = ChartFX.WPF.Borders.Glossy;chart1.Palette = ChartFX.WPF.Palettes.Mesa; JuanC
  12. You can also set those properties in XAML xmlns:cfxData="clr-namespace:ChartFX.WPF.Data;assembly=ChartFX.WPF.Data"<cfx:Chart.DataTransforms> <cfxData:ListTransform ColumnPath="AxisYList" SeriesPath="AxisX"/></cfx:Chart.DataTransforms> JuanC
  13. It seems you might need to use the ListTransform if you want one series per row in your model, I am not sure what the list of fields would do, also not sure what to do with the AxisX string given the fact that there is only one X axis, do you want this string to be the name of the series? (e.g. showing it in the legend box). If these assumptions are correct this code should generate the chart you need. ListTransform listTransform = new ListTransform();listTransform.ColumnPath = "AxisYList";listTransform.SeriesPath = "AxisX";chart1.DataTransforms.Add(listTransform);If this does not do what you expect you might want to post a sample app along with a description of the how the data should be plotted. JuanC
  14. You can modify the UseEffects property which will remove some of the effects (in the default glass style it will remove the reflection at the bottom as well as the shadows in some of the galleries) chart1.UseEffects = false;You can also completely change the style of the chart by using one of the following lines of code (this can also be set in XAML) chart1.Style = ChartFX.WPF.Motifs. Basic.Style;chart1.Style = ChartFX.WPF.Motifs.Simple.Style;// These are more elaborate and are implemented in ChartFX.WPF.Motifs.dllchart1.Style = ChartFX.WPF.Motifs.Edge.Style;chart1.Style = ChartFX.WPF.Motifs.Spotlight.Style;chart1.Style = ChartFX.WPF.Motifs.Blinds.Style;chart1.Style = ChartFX.WPF.Motifs.Floating.Style;// Implemented in ChartFX.WPF.Motifs.HandDrawn.dllchart1.Style = ChartFX.WPF.Motifs.HandDrawn.Style; JuanC
  15. JuanC

    YAxis position

    Use the position property of the Axis class. JuanC
  16. You can change the number of decimals as follows chart1.AxisY.Labels.Decimals = 3; Also note that even though data-related properties are declared of type DataUnit (including Min, Max, Step) you do not have to manually create the DatatUnit objects as they expose intrinsic cast from double and datetime which allows you to write this chart1.AxisY.Step = 0.2; But if the X axis is of type datetime you can write this chart1.AxisX.Min = new DateTime(...) I am not sure I understand the last question about 0 and 0.001, is this also related to number of decimals? JuanC
  17. Although most of our tests were done with CLR classes that expose its properties with the "appropriate" type, i.e. int, string, date, double, I can see that handling properties of type object might be useful in some scenarios. We should be able to provide a hotfix in the next few days to handle this. JuanC
  18. In our tests we could not duplicate the exception when using and empty collection of lines but we did find an issue when adding items to the collection later. Are you sure you are using our most recent hotfix? Did you check the file version of ChartFX.WPF.dll that is copied to the Bin\Debug folder in your app? If possible, please post (or send an email) with a sample app that duplicates this exception. JuanC
  19. I copied your code and it worked fine on 2 different machines. You might want to try changing your SetDataObject to this to see if it makes any difference Clipboard.SetDataObject(new DataObject(DataFormats.Bitmap, bmp), true); Also you can try exporting as a png instead of bitmap, both changes also worked in our tests. JuanC
  20. We choose how to convert values depending on the property type, if you change the type of property X to be DateTime then we will handle the dates properly, note that you will need to manually change the chart.AxisX.Labels.Format property to Date or DateTime. Unfortunately if we do not recognize the type (e.g. if the property type is object or IComparable) we fall back to use Convert.ToDouble which throws the exception you mentioned. JuanC
  21. The only difference I can think of between typing the name of the script in the creator and the copy/paste approach would be that when you just use PG Creator the current directory might not be the folder where the script is located. Have you tried using a fully qualified script path or moving your script to a folder whose path is in the Path environment variable? JuanC
  22. There are 3 ways to accomplish this 1) Using Conditional attributes: the following XAML will selectively show markers for objects whose Discount property is bigger than 0.3 <cfx:Chart Gallery="Line"> <cfx:Chart.Series> <cfx:SeriesAttributes BindingPath="CurrentPrice"/> </cfx:Chart.Series> <cfx:Chart.AllSeries> <cfx:AllSeriesAttributes> <cfx:AllSeriesAttributes.Marker> <cfx:MarkerAttributes Visibility="Hidden"/> </cfx:AllSeriesAttributes.Marker> </cfx:AllSeriesAttributes> </cfx:Chart.AllSeries> <cfx:Chart.ConditionalAttributes> <cfx:ConditionalAttributes Content="Special Value"> <cfx:ConditionalAttributes.Condition> <cfx:RangeCondition From="0.3" BindingPath="Discount"/> </cfx:ConditionalAttributes.Condition> <cfx:ConditionalAttributes.Marker> <cfx:MarkerAttributes Visibility="Visible" /> </cfx:ConditionalAttributes.Marker> </cfx:ConditionalAttributes> </cfx:Chart.ConditionalAttributes></cfx:Chart> Note that the Content property allows you to display conditional attribute in legend, Instead of RangeCondition you could also use DelegateCondition which allows you to provide a delegate that decides when to use this conditional attribute.2) Use Points API manually PointAttributes pointAttr = new PointAttributes();pointAttr.Content = "Using Points";pointAttr.Marker.Visibility = Visibility.Visible;pointAttr.Marker.Fill = Brushes.Red;chart1.Points[0, 1] = pointAttr;chart1.Points[0, 5] = pointAttr;Note that you can reuse the same PointAttributes for multiple points, if you do not set the Content property it will not appear in the legend box. 3) Changing the template for the marker Using this approach you could change the template used for the point markers and bind the visibility of the marker to one of your properties, there are a couple of drawbacks to this approach: first the visuals for all markers will be generated (although only some of them will be visible) which could negatively affect performance if you have thousands of points or more, also you would lose the flexibility of easily changing marker shapes. JuanC
  23. The following galleries are not supported in WPF (note that is not an exhaustive comparison of WPF against our WinForms/WebForms version) 3D Cones (not supported builtin but could theoretically be achieved using templates) 3D Curve Area Exploding Pie (will be supported in 8.1) Advanced Financial Charts: Renko, Kagi, Three Line Break and Point Figure Statistical Charts (most of these will be supported in 8.1) The following galleries are supported in WPF but not in our WinForms/WebForms versions Bullet HighLow Rose WinLoss TreeMap XYZ Support for these galleries will be added in WPF 8.1 Density HeatMap Pareto Waterfall JuanC
  24. JuanC

    Hiding Series

    About series visiblity not working, please post/send a sample app showing this. About binding series.Visibility, you can do so in both XAML or code, just like any other WPF binding. JuanC
  25. In our tests, clearing the top level list, or adding/removing items to the top level list updates the chart as expected. Please try reproducing this issue in a small sample app and send it to us. JuanC
×
×
  • Create New...