Jump to content
Software FX Community

JuanC

Staff
  • Posts

    863
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JuanC

  1. The problem is related to timing in the XAML parsing, because you are setting your attached property in the chart object, this is parsed first and your handler gets attached to the AxisY.GetLabel event, later a new AxisY is created and set which means this new axis will never fire the event. I modified your XAML/Code as follows MyChartView.xaml <cfx:Chart Gallery="Line" x:Name="WidgetChart" ItemsSource="{Binding Path=MyData2, Mode=OneWay}" MinWidth="200" MinHeight="320"> <cfx:Chart.AxisY> <cfx:Axis vm:ChartFxNumerQuickFormatBehaviour.ChartFxNumerQuickFormat="True" ForceZero="False" > ChartFxNumerQuickFormatBehaviour.cs private static void OnChartFxNumerQuickFormatPropertyChanged(DependencyObject dpo, DependencyPropertyChangedEventArgs args){ // chart = dpo as Chart; // Axis axisY = chart.AxisY; Axis axisY = dpo as Axis; if (dpo == null) return; if (args.NewValue is bool == false) return; if ((bool)args.NewValue) axisY.GetLabel += new AxisLabelEventHandler(OnAxisYLabel); else axisY.GetLabel -= new AxisLabelEventHandler(OnAxisYLabel); } Regards, JuanC
  2. BTW, binding the AxisY.Labels is not necessary so you should feel free to comment/remove the AxesY part from the XAML (unless you are setting other properties in the real app in which case I would recommend removing the BindingPath="Price" assignment from the Y axis). JuanC
  3. I uncommented the line for 1/9/2009 but I do not see anything wrong in the zoomed chart. Do I have to zoom a specific portion of the chart to see the issue?Can you provide additional details (description, screenshot) of the differences with that line commented/uncommented?Do you get the same result if you do not set the Zoom.Mode in XAML but instead just set it to selection in a button? JuanC
  4. JuanC

    How to use Zoom?

    Current builds support the magnifier through Zoom.Magnifier, e.g. chart1.Zoom.Magnifier.IsEnabled = true/false; There are other setings such as the size of the magnifier or the magnification factor you can also control through other properties in the ZoomMagnifier class. JuanC
  5. Unfortunately the only way to achieve the formatting you are looking for is to handle the GetLabels event which means you will have to wire this event. I have not tried to do this with an attached behaviour so if you can post a small sample we can check why the event does not get fired/handled. This is a feature we have also implemented in other products so we will check if we can include support for this in 8.1 through a new member in the AxisFormat enumeration. The only issue with K/M abbreviations is whether we can support this in a localization-friendly manner. Other languages might use different prefixes/suffixes or different threholds. JuanC
  6. Can you please create an empty project using BxF that contains a listbox and chart bound to some dummy data and post a zip file including the source and the bin folder? This will allow us to focus on trying to support your scenario as we have not used BxF before JuanC
  7. ScatterXYZ needs 2 series. The first series should have X and Y values while the second series Y data will be used as the Z values, e.g. List<XYZData> xyzData = new List<XYZData>(); xyzData.Add(new XYZData(1,1,2)); ... chart1.Series.Clear(); chart1.Series.Add(new SeriesAttributes() { BindingPath = "Y", BindingPathX = "X" }); chart1.Series.Add(new SeriesAttributes() { BindingPath = "Z" }); chart1.ItemsSource = xyzData; Note that we are assigning the data on a per-chart basis as you will probably have your XYZ information in a single list. In the sample I am assuming the XYZData class has 3 numeric properties called X, Y and Z. Although you could pass the data on a per series basis you will still need to "combine" X and Y in a single list so it is not possible to pass 3 double arrays. If you need multiple sets of XYZ scatters, i.e. you have 2 lists of XYZ data you need to pass then you would do something like this chart1.Series.Clear(); chart1.Series.Add(new SeriesAttributes() { BindingPath = "Y", BindingPathX = "X", ItemsSource=xyzData1 }); chart1.Series.Add(new SeriesAttributes() { BindingPath = "Z", ItemsSource=xyzData1 }); chart1.Series.Add(new SeriesAttributes() { BindingPath = "Y", BindingPathX = "X", ItemsSource=xyzData2 }); chart1.Series.Add(new SeriesAttributes() { BindingPath = "Z", ItemsSource=xyzData2 }); JuanC
  8. Do you get a message box when clicking on the error icon? Can you expand on how often these gadgets are refreshed and how often you get the error? JuanC
  9. To use a .gadget exported by PowerGadgets Creator you need to install PowerGadgets Client on the target machine. This is similar to the fact that to run a PGF you need to have the PG client installed on the target machine. JuanC
  10. Each axis controls not only how labels are displayed but also how values are displayed that are "tied" to such axis, for example point labels, tooltips and data view. >> To change the labels chart1.AxisY.Labels.Decimals = 1; >> To change other values displayed according to this axis chart1.AxisY.DataFormat.Decimals = 3; Also note that both Labels and DataFormat support other properties such as Format (Currency, Numeric, etc.), CustomFormat and ScaleUnit that contribute to how values are formatted. JuanC
  11. Unfortunately in PowerGadgets 1.0 (current version) you can only populate other properties such as mainscale_max or an innergauge property from data when using PowerShell. The only work around at the moment would be very similar to your experiment, e.g. - invoke-sql ... | out-gauge - Use Copy-Paste trick to create a PGF Note that this PGF can be later edited in the creator to adjust the visual appearance, the drawback is that PowerShell needs to be installed in the machine where the PGF will be viewed. We will support populating other properties directly from SQL in our next version but I am not sure if we will expose UI to achieve this. For now if you are using Powershell as the data source you can manually edit the PGF Data.PropertyCount: Number of extra properties that should be populated from a column in the data Data.PropertyX: Name of the property to modify, note that _ is used for subproperties Data.PropertyXScriptBlock: Powershell script block, typically $_.ColumnName although you could also write any valid powershell expression. Hope this helps. JuanC
  12. We have been unable to reproduce this issue, can you please - Download our most recent hotfix here (make sure to run IE as an Administrator if UAC is enabled) and check if the problem persists. and/or - Post a complete code sample that duplicates this issue. JuanC
  13. Are you assigning this new Y axis to at least one series? JuanC
  14. Unfortunately the OtherTransform is not prepared to handle multiple series in Chart FX for WPF 8.0 We have rewritten our implementation in ChartFX for WPF 8.1 which should be released relatively soon as a free update. I tested your scenario in 8.1 and it works fine. Our new behavior works as follows A, 9, 1 B, 1, 8 C, 1, 1 D, 1, 1 Default Behavior 1st pie shows A and Other that includes B, C and D. 2nd pie shows B and Other that includes A, C and D. Legend box shows A, B and Other Alternate Behavior (ShowMixedValues = true) 1st pie shows A, B and Other that includes C and D. 2nd pie shows A, B and Other that includes C and D. Legend box shows A, B and Other JuanC
  15. >> Installing the hotfix Note that you can also visit our hotfix page even on a machine without Chart FX installed, instead of installing you can download the hotfix as a self-extracting executable that you can then run on the machine where ActiveX controls are disabled. >> Setting the visibility to hidden instead of collapsed We will research this as the visual corruption should not exist but we try as much as possible to honor the WPF behavior where a hidden element will not be visible but it "occupies" space. Maybe this is the reason the for the corruption >> Zoom capabilities Note that we provide some zoom capabilities for 2D charts which might be helpful on other charts. You can enable them by setting Chart.Zoom.Mode to Selection. This allows the end user to select a range and we will handle zooming. You can also change the zoom style by setting the Chart.Zoom.Style property to one of the following values: Scroll (after the user selects the range a set of scrollbars will appear on each axis), Map (useful for scatter charts) and Stripe (similar to map but scrolling is limited to X axis). >> Zoom issue What happens when the user selects a range, do you set the ItemsSource property again? Do you change any of the data transforms? Does the data source supports INotifyCollectionChanged? JuanC
  16. You can install our most recent hotfix here. Note that if UAC is enabled in your machine you have to run IE as administrator. This page works for both users that purchased the product as well as trial users. JuanC
  17. JuanC

    Axis Order

    The axes will be drawn inside-out starting with the main axis being drawn closer to the plotting area. Because you can easily change which axis is assigned to each series you should be able to achieve the required order. If you have trouble doing so, please post a short code snippet/XAML showing how you are creating your axes and include a picture showing current against desired result. JuanC
  18. You will have to process your data, find the missing readings (longer than expected) and insert an extra CLR object that returns double.Nan as the value being plotted (Y value). JuanC
  19. Can you post a sample app that reproduces this behavior? It is probably more related to how the data is being changed instead of the gallery or other visual aspects of the chart. JuanC
  20. JuanC

    Axis formatting

    There are a couple of ways to achieve this, 1) Change the culture for the Y axis chart1.AxisY.Culture = new System.Globalization.CultureInfo("ja-JP"); 2) Change the formatting string for the Y axis labels chart1.AxisY.Labels.CustomFormat = "
  21. It is the right forum and I apologize for our delay getting back to you. As I am more on the technical side I will poke our program managers again to provide feedback. JuanC
  22. JuanC

    ChartFx Style

    Setting the Spotlight Style is no different than setting the palette, in both cases you are setting a property and the value is the result of using a static property. You will have to add an xml namespace for the Motifs namespace you are interested in and use x:Static as you are doing with Palette or Border. About setting other properties, I am assuming you mean complex properties such as LegendBox, Axis, etc. Note that in ChartFX you cannot reuse objects, e.g. you cannot reuse an Axis or LegendBox in multiple charts so we have some code that detects if you are setting such properties through a style and clone such objects. We support such complex-property styling with the following properties: Chart.LegendBox, Chart.AllSeries, Chart.AxisY, Chart.AxisX and Chart.PlotArea. I don't think this functionality has been heavily used, please let us know if setting certain properties on these objects do not work as expected. JuanC
  23. JuanC

    ChartFx License

    >> but I have added the license in the main executable and it seems to work This is the way .NET licensing works, license is only embedded into executables. I assume Microsoft did this to avoid people writing a wrapper dll that would workaround the license. >> You mentioned that VS must embed the license in the executable, does it mean that I cannot produce releases with the bulid server? Even though I mentioned VS, the same thing can be accomplished by msbuild / .NET SDK. From the Chart FX point of view the build server needs to have a valid Chart FX license installed. Please contact sales at softwarefx dot com for details. JuanC
  24. We have uploaded a new build (3985) that should fix these issues when using crosstab and an empty data source. JuanC
  25. JuanC

    ChartFx License

    You have to deploy ChartFX.WPF.dll and any other Chart FX dlls you might be using (Data, Annotation, Motifs, etc.) I noticed you specifically mentions that you are creating your charts dinamically, note that Chart FX for WPF uses the standard .NET licensing scheme which means we need VS to embed our license into your executable. The easiest way to achieve this would be to add a chart at design time to one of your windows/pages even if this window will never be shown. Altertnatively you could manually edit licenses.licx and add information about our component so that Visual Studio knows that it should embed our license into your executable. - You will then need to create a licenses.licx file and place the following text in it. SoftwareFX.ChartFX.Chart, ChartFX, Version=8.0.XXXX.ZZ, Culture=neutral, PublicKeyToken=a1878e2052c08dce - Add the licenses.licx file to your exe project. You can also create a dummy project, drop the chart at design time in one of the windows and check the licenses.licx and changes to csproj that Visual Studio will perform. Hope this helps JuanC
×
×
  • Create New...