Jump to content
Software FX Community

JuanC

Staff
  • Posts

    863
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JuanC

  1. There seems to be a typo in your code as you are setting the AxisX.Max instead of AxisY.Max. I tried using AxisY.Max and you will get the expected result. Regards, JuanC
  2. Currently we do not provide an end user interface to any elements on the chart. This is something we have considered including in future builds. Regards, JuanC
  3. This is actually a feature, the idea is that we auto calculate the axis margin to avoid clipping, e.g if in your chart you turn on labels and position them on top of the bars, more space will be needed in order to show the labels. <cfx:Chart.AllSeries> <cfx:AllSeriesAttributes> <cfx:AllSeriesAttributes.PointLabels> <cfx:PointLabelAttributes Visibility="Visible" VerticalAlignment="Top" /> </cfx:AllSeriesAttributes.PointLabels> </cfx:AllSeriesAttributes></cfx:Chart.AllSeries>You can turn this feature off this by setting the AutoMargin property to false, e.g. <cfx:Chart.AxisY> <cfx:Axis AutoMargin="True"/></cfx:Chart.AxisY>or in code chart1.AxisY.AutoMargin = false; Hope this helps.JuanC
  4. Set the Position property of the Axis object to AxisPosition.Far, e.g. chart1.AxisY.Position = AxisPosition.Far;Regards, JuanC
  5. Can you post or send a sample so that we can duplicate the "click-through" behavior you described? Regards, JuanC
  6. You can try setting the chart1.PlotArea.Margins property manually. If you also know in advance the range of your primary and secondary Y axes you can set their Min and Max properties. Can you post a screenshot or even better some sample code that shows the "initial Y-axis values being cut off on the right hand side"? Regards, JuanC
  7. JuanC

    Bubble Chart

    Assuming sample data as follows <XmlDataProvider x:Key="mySampleData" XPath="Products/Product"> <x:XData> <Products xmlns=""> <Product Sales="20" Projected="18" Country="USA"/> <Product Sales="12" Projected="16" Country="Japan"/> <Product Sales="15" Projected="9" Country="Germany"/> <Product Sales="28" Projected="29" Country="Brazil"/> </Products> </x:XData> </XmlDataProvider> You can do this <cfx:Chart Gallery="Bubble" x:Name="chart1" Grid.Row="1" ClickCommand="{x:Static cfx:Chart.SelectCommand}" ItemsSource="{Binding Source={StaticResource mySampleData}}"> <cfx:Chart.Series> <cfx:SeriesAttributes BindingPath="@Sales"/> <cfx:SeriesAttributes BindingPath="@Projected"/> </cfx:Chart.Series> <cfx:Chart.AllSeries> <cfx:AllSeriesAttributes> <cfx:AllSeriesAttributes.Template> <DataTemplate> <Ellipse x:Name="ellipse" Width="{Binding Path=Width}" Height="{Binding Path=Height}" Fill="{Binding Path=Fill}" Stroke="{Binding Path=MarkerStroke}" StrokeThickness="{Binding Path=StrokeThickness}" Opacity="0.5"/> <DataTemplate.Triggers> <DataTrigger Binding="{Binding Path=Selected}"> <DataTrigger.Value> <sys:Boolean>True</sys:Boolean> </DataTrigger.Value> <Setter Property="Opacity" Value="1" TargetName="ellipse" /> </DataTrigger> </DataTemplate.Triggers> </DataTemplate> </cfx:AllSeriesAttributes.Template> </cfx:AllSeriesAttributes> </cfx:Chart.AllSeries> <cfx:Chart.Titles> <cfx:Title> <TextBlock DataContext="{Binding ElementName=chart1, Path=SelectedItem}" Text="{Binding XPath=@Country}" /> </cfx:Title> </cfx:Chart.Titles> </cfx:Chart> Note the following 1) Setting the ClickCommand to be the SelectCommand means we will change the selectedItem property of the chart to point to the data item when the user clicks the marker 2) By default our styles do not show Selected items in a different way so we are templating the bubble chart, setting default transparency to 50% and then setting it to 100% when the item is selected. You can also decide to show the bubble with a different Fill/Border/BorderThicknes 3) We are binding the content of the title to be show the country the user is selecting, you could also bind other pieces of your UI, e.g. showing a panel with multiple details about the selected bubble. 4) Because DataItem is a CLR property but our source is XML the textblock binding is "broken" in two as mixing Path and XPath does not seem to work. Hope this helps. JuanC
  8. Future builds will support the following new properties DataView.Fields.Orientation: Specifies whether fields should have a vertical, horizontal or Auto orientationSeriesField.Template: Allows to template a SeriesField. You can use this in conjunction with our ToolTipConverter e.g. < cfx:Chart Gallery="Pie" x:Name="chart1" ItemsSource="{Binding Source={StaticResource myXmlData}}"> <cfx:Chart.Series> <cfx:SeriesAttributes BindingPath="@Sales"/> </cfx:Chart.Series> <cfx:Chart.AxisX> <cfx:Axis> <cfx:Axis.Labels> <cfx:AxisLabelAttributes BindingPath="@Name"/> </cfx:Axis.Labels> </cfx:Axis> </cfx:Chart.AxisX> <cfx:Chart.DataView> <cfx:DataView Visibility="Visible"> <cfx:DataView.Fields> <cfx:DataViewFieldAttributes Orientation="Vertical"> <cfx:DataViewFieldAttributes.Items> <cfx:AxisField ShowMarkers="true"/> <cfx:SeriesField SeriesIndex="0"> <cfx:SeriesField.Template> <DataTemplate> <DataTemplate.Resources> <cfxConverters:TooltipConverter x:Key="tooltipConverter"/> </DataTemplate.Resources> <TextBlock Text="{Binding Path=Self, Converter={StaticResource tooltipConverter}, ConverterParameter=%v (%p%%)}" Margin="{Binding Path=Margin}" Foreground="{Binding Path=Foreground}" FontFamily="{Binding Path=FontFamily}" FontWeight="{Binding Path=FontWeight}" FontSize="{Binding Path=FontSize}" FontStyle="{Binding Path=FontStyle}" HorizontalAlignment="Right" VerticalAlignment="Center"/> <DataTemplate.Triggers> <DataTrigger Binding="{Binding Path=Dimmed}"> <DataTrigger.Value> <sys:Boolean>True</sys:Boolean> </DataTrigger.Value> <Setter Property="Opacity" Value="0.25" /> </DataTrigger> </DataTemplate.Triggers> </DataTemplate> </cfx:SeriesField.Template> </cfx:SeriesField> </cfx:DataViewFieldAttributes.Items> </cfx:DataViewFieldAttributes> </cfx:DataView.Fields> </cfx:DataView> </cfx:Chart.DataView></cfx:Chart>A little verbose but it will get the job done Regards, JuanC
  9. Currently we switch the dataview display depending on the location. If it is docked to the left or right, each dataview row will correspond to an item in your data. If it is docked to the top or bottom, we display each item on a different column. This is done primarily to try to take advantage of the available space assuming a typical chart has more items than series. We will consider adding a property to control this in future builds. About displaying percentages, we do not have a specific feature that will help you accomplish this. We will research if we can support this in future builds as well. Regards, JuanC
  10. If you want to setup your data in XAML you will be using an ObjectDataProvider in your resources and your ItemsSource should be set to a Binding whose Source is the ObjectDataProvider, e.g.<Grid.Resources><ObjectDataProvider x:Key="bidsData" ObjectType="{x:Type localData:Bids}" /></Grid.Resources> < cfx:Chart x:Name="chart1" ItemsSource="{Binding Source={StaticResource bidsData}}">If you want to set your data in code, you can just set the ItemsSource property to your collection. Note that this is independent of the gallery you use. About styling your candlestick chart, please send an email to wpf at softwarefx dot com. Regards, JuanC
  11. To create a Candlestick chart you need to create a chart with 4 series, and use BindingPath on each of these series, e.g. <XmlDataProvider x:Key="MyData" XPath="OHLCData/OHLC"><x:XData><OHLCData xmlns=""><OHLC Low="20" High="30" Open="22" Close="26"/><OHLC Low="12" High="32" Open="28" Close="22"/><OHLC Low="24" High="30" Open="24.5" Close="29.5"/><OHLC Low="20" High="30" Open="22" Close="26"/><OHLC Low="12" High="32" Open="28" Close="22"/><OHLC Low="24" High="30" Open="24.5" Close="29.5"/><OHLC Low="20" High="30" Open="22" Close="26"/><OHLC Low="12" High="32" Open="28" Close="22"/><OHLC Low="24" High="30" Open="24.5" Close="29.5"/><OHLC Low="20" High="30" Open="22" Close="26"/><OHLC Low="12" High="32" Open="28" Close="22"/><OHLC Low="24" High="30" Open="24.5" Close="29.5"/><OHLC Low="20" High="30" Open="22" Close="26"/><OHLC Low="12" High="32" Open="28" Close="22"/><OHLC Low="24" High="30" Open="24.5" Close="29.5"/></OHLCData></x:XData></XmlDataProvider> <cfx:Chart Gallery="Candlestick" x:Name="chart1" Grid.Row="2" Margin="10" ItemsSource="{Binding Source={StaticResource MyData}}"><cfx:Chart.Series><cfx:SeriesAttributes BindingPath="@Open" GroupContent="Nasdaq"/><cfx:SeriesAttributes BindingPath="@High"/><cfx:SeriesAttributes BindingPath="@Low"/><cfx:SeriesAttributes BindingPath="@Close"/></cfx:Chart.Series></cfx:Chart>Please note that the order of the series should always be Open - High - Low - Close Regards, JuanC
  12. I would recommend you download and install our RC1 bits. JuanC
  13. Can you double check the file version for ChartFX.WPF.dll? It should be 8.0.NNNN.NNNN. 2.0.50727 sounds like the version of the .NET framework 2.0 JuanC
  14. We have been unable to reproduce this problem, in our tests using the sample code you posted results in a valid png, this is the code we tested. ChartFX.WPF.Chart newChart = new ChartFX.WPF.Chart();newChart.Width = 500;newChart.Height = 300;newChart.Style = ChartFX.WPF.Motifs.Basic.Style;newChart.ItemsSource = zChart.ItemsSource; // Export the chart to a png filenewChart.Export(ChartFX.WPF.FileFormat.Png, "C:\\Temp\\Test.png"); Are you using any special settings in the XAML or Code for zChart? Have you tried to duplicate this issue in a sample app with a XAML Window with a simple chart (you might use an XmlDataProvider with dummy chart so that you can send us a complete sample). To help us try to reproduce the problem please post the following information: OS including Service Pack.NET Version including Service PackFile Version for ChartFX.WPF.dllVideo Card Manufacturer and Driver Version Regards, JuanC ChartFXWPFTest12.zip
  15. JuanC

    chartFX for wpf

    I suspect the delay experienced the first time your form is shown might be related to JIT time.Please try running NGEN ChartFX.WPF.dll in the target machine, this will natively compile our assembly and keep it on the GAC, then at runtime, .NET will use these pre-jitted assembly instead of jitting it every time the app is run. If when you say "I have a Chart FX for WPF control on a windows form" you actually mean your application is not a WPF app, then please note that the first time the chart is created, the system will at least have to load WPF assemblies. There are some scenarios where WPF assemblies might not be NGENed so you might want to also try to runing the following command on the target machine "NGEN executeQueuedItems". Regards, JuanC
  16. We have fixed this issue. We can provide a hotfix (send email to wpf at softwarefx dot com) if you need to test this functionality. Regards, JuanC
  17. Can you please post a sample XAML/CS that exhibits this issue? Regards, JuanC
  18. I never got your private message. Can you expand on what is "not working" when using that code? Do you get an empty image? Can you post the image you get? Are you executing this code on the UI thread or are you creating a background thread? Regards, JuanC
  19. I do not think we got your email. You will have to create a chart object in code and customize it in a similar way as the one being displayed on the screen, including binding it to the same data source. Regards, JuanC
  20. Can you expand on what you mean by "User interactions are not responding"? Can you post a sample app that allows us to duplicate the bevhavior you are observing? Regards, JuanC
  21. To control these brushes you have to set BOTH the Fill properties for the first and second series (i.e. chart1.Series[0].Fill and chart1.Series[1].Fill) Note that there is a bug where if you change these brushes after the chart has been rendered, the new settings will not be applied. If you set thes brushes (to either solid colors or linear brushes) in the XAML or in your Window/Page Load event it should work fine. Regards, JuanC
  22. Unfortunately WPF does most of its job in a "render thread" so I am not sure if you can force a complete redraw asynchronously, even if you did do you want the chart to grow/shrink when generating the PDF? Have you considered creating a separate chart only used for the export? We added some special code to support this scenario of exporting a chart that has never been visible. Regards, JuanC
  23. Can you try to recreate the issue in a small test app? Regards, JuanC
  24. Animating elements in the chart is not as simple as animating elements in Blend because 1) You do not have direct access to bars/points/etc visuals 2) There is a big difference in look and layout between a bar, line and pie chart. Can you describe the animation you are looking for? JuanC
  25. No. At this time we do not offer any UI (Menus or otherwise) in the tool except for scrolling (and zooming once the Zoom.Mode is set) Regards, JuanC
×
×
  • Create New...