Jump to content
Software FX Community

JuanC

Staff
  • Posts

    863
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JuanC

  1. You should be able to specify the Y axis that a series should use in XAML using the Axis.Index attached property as follows <cfx:SeriesAttributes cfx:Axis.Index="0"/> JuanC
  2. It shows 13% because it calculates the percentage as 12.5 and then shows it using .NET toString formatted with 0 decimals. You can control this by changing the Decimals property used for the AxisY.Labels JuanC
  3. We have been unable to duplicate this error in other localized windows versions. In the mean time can you try running a "Command Prompt", change the current directory to the PG installation folder (typically \Program Files\PowerGadgets 2.0) and execute the following command PowerGadgets.CreatorMobile.exe /_language:en-US This language parameter allows you to run PG with other supported languages, you probably will not see any difference as we do not provide a german localization but there is a small chance it might fix the hang when using parameters This issue is because we are not aware of a .NET API to detect the SQL parameters (names, types, etc.) so we handle exceptions thrown by the .NET framework and it seems in your case these exceptions are probably been localized. Note that the build you are using will hang when using uniqueidentifier fields as a parameter even if the language parameter takes care of the hang with other parameter types, we already fixed this issue internally and our next public build will fix this. We will research an alternative method where we prompt you for the parameter types. Regards, JuanC
  4. We recently fixed an issue related to parameters of type "uniqueidentifier" but it showed as a hang instead of a crash. Are you using a non-english windows version?Can you confirm that it also crash if trying to use a parameter with an integer/long column?Do you get any additional information (exception, stack, etc.) when the app crashes? Regards, JuanC
  5. Can you please post the version of PowerGadgets.CreatorMobile.exe? You should be able to view this in Windows Explorer right clicking the exe. Also please tell us the SQL server version you are using and the type of the brokerage_id field to see if we can duplicate the issue. Regards, JuanC
  6. The following xaml will use the basic chart style and customize the plot area frame template with a curved border. <cfx:Chart Gallery="Bar" x:Name="chart1" Style="{x:Static cfxMotifs:Basic.Style}" > <cfx:Chart.PlotArea> <cfx:PlotAreaAttributes> <cfx:PlotAreaAttributes.FrameTemplate> <DataTemplate> <Border CornerRadius="8" Width="{Binding Path=Width}" Height="{Binding Path=Height}" Background="{Binding Path=Fill}" BorderBrush="{Binding Path=Stroke}" BorderThickness="{Binding Path=StrokeThickness}" /> </DataTemplate> </cfx:PlotAreaAttributes.FrameTemplate> </cfx:PlotAreaAttributes> </cfx:Chart.PlotArea> Note that to use the cfxMotif you would need the following namespace declaration at the root of your xaml xmlns:cfxMotifs="clr-namespace:ChartFX.WPF.Motifs;assembly=ChartFX.WPF" JuanC
  7. Please set the Axis format to AxisFormat.Time instead of DateTime. Also note that if you only have a single series or if all series can read the data from the same collection, you will get better performance by using Chart.ItemsSource instead of Series.ItemsSource. Series.ItemsSource should only be used in cases where multiple series need to read data from different collections. Regards, JuanC
  8. Most of our styles (including the default) draw a border around the plot area. You might want to try switching styles chart1.Style = ChartFX.WPF.Motifs.Simple.Style; Instead of Simple you could also use Basic, Edge or Spotlight. You can also change the palette in case the color used of the plot area border is not strong enough. chart1.Palette = ChartFX.WPF.Palettes.Adventure; Other palettes in the same namespace include Mesa, Primary and others. Finally you can control the plot area border color manually chart1.PlotArea.Stroke = System.Windows.Media.Brushes.Red; Regards, JuanC
  9. I tried HH mm and it works fine, the time is formatted using a 24 hour clock (we are using the .NET formatting APIs to actually format the datetime) and the labels are only drawn when they fit. Can you post a small sample app (you can use harcoded or random data) that duplicates the problem you are experiencing? JuanC
  10. Is your field a datetime field? I tried the following permutations and they all worked <cfx:Axis.Labels> <cfx:AxisLabelAttributes CustomFormat="yyyy MM" BindingPath="Date" /></cfx:Axis.Labels> <cfx:Axis.Labels> <cfx:AxisLabelAttributes Format="Date" CustomFormat="yyyy MM" BindingPath="Date" /></cfx:Axis.Labels> JuanC
  11. Can you send us a screenshot (support at softwarefx dot com) of how the chart looks when you increase the font size? JuanC
  12. JuanC

    Getting Started

    If you can see the XML from your computer but not your iPad I can only guess you are having a firewall issue. Can you try reaching the same URL from a different machine? Are you using Windows 7 or Vista and have the firewall enabled? About SQL CE, we should be using the "private" SQLCE assemblies so you should not need to install anything. Sample files should be installed to 2 folders: 1) C:\Users\<YourUserName>\AppData\Local\Software FX, Inc\PowerGadgets Mobile Creator\2.0\Samples2) <TargetInstallationFolder>\Samples If the SDF is missing from one of these folders please try copying it from the other. If you don't find them in any of the folders please send an email to support at softwarefx dot com and we will send you a zip file with all the sample files. Regards, JuanC
  13. JuanC

    Getting Started

    To test the server part you can try the following URL in your browser http://localhost/pgserver/request.asmx?url=bar.pgf Where bar.pgf is the name of the PGF file you saved to the PGServer root folder. This should return an XML with some attributes of the PGF. If there was an installation error or missing files you should see a detailed error in the browser. Note that you might need to also tweak the customErrors section in the web.config if you do not receive a detailed error message/stack trace. About the SQLCE database our installer is supposed to install SQL Compact 4.0 (version 4.0.8482.1), you can download it from http://www.microsoft.com/download/en/details.aspx?id=17876 Regards, JuanC
  14. ZoomStyle.Stripe only works in the X axis. For XY charts you can use ZoomStyle.Map Regards, JuanC
  15. There is a property that specifies the minimum size used for the plotarea in this situations (chart.PlotArea.MinSize), the default is 50 (50%) note that if you use smaller values (or longer labels) you might get to a situation where the labels are visible but the space allocated for the pie itself is too small. You can also consider alternate strategies such as changing the chart's default style from glass to basic, changing the font size, etc. Regards, JuanC
  16. 1. It is not possible to use a font character as a marker but you can specify your own template for a marker. 2/3. ChartFX for WPF does not support editing capabilities, the DataView will not allow you to change values. As an alternative you could use a WPF grid view instead of the built-int data view. If they are both bound to the same data, the changes in the grid view should be reflected on the chart. 4. Please post a screenshot of the customizations you need. If you don't want to post the customizations in a public place, please send an email and include a pointer to this thread. Regards, JuanC
  17. I think the snippet got lost in your posting but this is a sample of how to change the background color of your dataview cells, the key of the sample is that in most logical items we generate (and you can style to change the appearance of the bars, legend items, etc.) the DataItem property will typically point to the data you provided to the chart. Data Model public class BusinessData { public double Y1 { get; set; } public double Y2 { get; set; } } XAML to customize chart, note that we use SeriesField, because of this you will automatically get some nice behaviors, for example if your axis was formatted as currency the ValueText property would reflect that, you could also have used DataField which can be used to place a field from your data even if it is not plotted as a series. Obviously you might want to place the template separately but this helps on sample simplicity. <cfx:Chart.DataView> <cfx:DataView Visibility="Visible"> <cfx:DataView.Fields> <cfx:DataViewFieldAttributes> <cfx:DataViewFieldAttributes.Items> <cfx:SeriesField SeriesIndex="0"> <cfx:SeriesField.Template> <DataTemplate> <DataTemplate.Resources> <local:BusinessDataColorConverter x:Key="businessDataColorConverter"/> </DataTemplate.Resources> <TextBlock Text="{Binding Path=ValueText}" Background="{Binding Path=DataItem, Converter={StaticResource businessDataColorConverter}}" 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> Code to populate chart List<BusinessData> list = new List<BusinessData>(); list.Add(new BusinessData() { Y1 = 10, Y2 = 12 }); list.Add(new BusinessData() { Y1 = 14, Y2 = 11 }); list.Add(new BusinessData() { Y1 = 11, Y2 = 17 }); chart1.Series.Add(new SeriesAttributes("Y1")); chart1.Series.Add(new SeriesAttributes("Y2")); chart1.ItemsSource = list; Color Converter object IValueConverter.Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture { BusinessData businessData = (BusinessData) value; if (businessData.Y1 > businessData.Y2) return Brushes.Yellow; else return Brushes.White; } Regards, JuanC
  18. Metafiles is a Win32-concept only that does not seem to have any available APIs in WPF. We have worked on supporting an export-to-xaml option that would generate "clean" XAML but we have not enabled it yet in the release builds. JuanC
  19. Personally, I think binding has its place but trying to support every possible chart feature with binding may not be practical or even possible. In the scenario you describe I would say binding is appropriate for - Passing Data: We do support INotifyPropertyChanged and INotifyCollectionChanged so changes in your data should be replicated automatically to the chart, note that even though we optimized handling collection notification events when the data is passed to the chart (Chart.ItemsSource),it has not been optimized if you pass data on a per-series basis when handling these collection notification events. - Color and other Series Attributes: We do support binding in most of the series attributes, note that because your series might be dynamic you might have to setup these bindings through code but might make your UI simpler to develop. For the other features you are using, drag & drop series from panes, annotations, axis formatting and custom grid lines I would not try to use bindings. This might not go well with a strict MVVM approach but I am not sure if it is practical or even possible to handle everything with bindings. JuanC
  20. Bars will always be drawn "centered" around their X axis position but you can move the labels with the following code chart1.AxisX.Labels.Position = AxisLabelPosition.Center; JuanC
  21. Because of the way we currently draw the surface gallery in WPF it is not possible to highlight the active cell. We will research if we can add support for this in future versions of the product. Regards, JuanC
  22. Internally chartfx handles doubles as the values for both X and Y so we do convert datetime/timespan to doubles, additionally because of loss of precision when these numbers become too big we are only accurate to around a millisecond. The only way to work around this would be for you to convert your datetimes to doubles differently, e.g. you could use the difference in ticks between your dates and the first date (this would make sure your numbers don't start losing precision when they become too big). Then you would have to handle how the axis labels are painted. private void ReloadData() { MyPoint[] data1 = new MyPoint[30]; FillData(data1, 1); SeriesAttributes series = new SeriesAttributes(); series.BindingPath = "Y"; series.BindingPathX = "XTime"; chart1.Series.Add(series); chart1.ItemsSource = data1; chart1.AxisX.GetLabel += new AxisLabelEventHandler(OnAxisGetLabel); } private void OnAxisGetLabel(object sender, AxisLabelEventArgs e) { double d = e.Value; TimeSpan ts = new TimeSpan((long) d); double milliSeconds = ts.TotalMilliseconds; e.Text = (milliSeconds / 1000).ToString("#.####"); } private void FillData(MyPoint[] data1, double factor) { DateTime time = new DateTime(2011,1,1,0,0,0,DateTimeKind.Local); DateTime firstTime = time; for (int i = 0; i < data1.Length; i++) { time = time.AddTicks(500); data1.Y = i; data1.Time = time; data1.FirstTime = firstTime; } } Hope this helps, obviously this is an oversimplification of your sample code. JuanC
  23. I am not sure if this is what you mean, but you can create one or more titles in the chart and use the DockPanel.Dock property. Note that because Title does not derive from UIElement you will have to use title.SetValue(DockPanel.DockProperty, value) instead of DockPanel.SetDock. Also note that some styles (for example glass which is the default) may handle the main title - first title in the chart.titles collection - differently than other titles. In the case of glass we use a different location and size for the main title. JuanC
  24. Unfortunately we do use the same color (and width, linestyle, etc.) when painting the gridlines and the tickmarks. A vertical gradient hack would work but you would have to fine tune the percentages in order to force a change of color when the gridlines crosses the axis. We will reconsider adding a property to control this, we did consider this in the past but decided that it was not a common enough case to warrant the extra complexity. JuanC
  25. We fixed this in build 3966. Starting on that build we changed the palette used in Floating so that it forces the background to be transparent but honor the background set by the user. Regards, JuanC
×
×
  • Create New...