Jump to content
Software FX Community

JuanC

Staff
  • Posts

    863
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JuanC

  1. JuanC

    TreeMap Subtext

    The sample in question is shipped as part of the product and also linked from the resource center. It modifies the PointLabelAttributes template property as follows <cfx:PointLabelAttributes.Template> <DataTemplate> <StackPanel> <TextBlock Text="{Binding Path=DataItem.Company}" HorizontalAlignment="Center" Foreground="Black" FontWeight="Bold" /> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> <TextBlock Text="$" Foreground="Black" /> <TextBlock Text="{Binding Path=DataItem.Price}" Foreground="Black" /> <TextBlock Text=" (" Foreground="Black" /> <TextBlock Text="{Binding Path=DataItem.Perc}" Foreground="Black" /> <TextBlock Text=")" Foreground="Black" /> </StackPanel> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> <TextBlock Text="mkt cap: $" Foreground="Black" /> <TextBlock Text="{Binding Path=DataItem.Capital}" Foreground="Black" /> <TextBlock Text=" bil." Foreground="Black" /> </StackPanel> </StackPanel> </DataTemplate> </cfx:PointLabelAttributes.Template> JuanC
  2. Update: After some consideration and code tweaking we found a relatively safe way to add support for this scenario, to fix the first problem "The points on the categorical axis are not drawn on the label on the x-axis" you can add the following (this should be supported in the current build) chart1.AxisX.AxisStyle |= AxisStyles.Categorical;To fix the second problem "The points on the non-categorical axis are not drawn according their x value" you will need a new hotfix that should be available in a couple of days, any build marked 3775 or later should add support for this.JuanC
  3. No. Separating slices in a pie/doughnut chart is currently not supported. JuanC
  4. Yes, you would use the DataView.Visibility property. JuanC
  5. You can achieve this chart by using a 3D stacked gantt, as follows chart1.Gallery = Gallery.Gantt; chart1.View3D.IsEnabled = true; chart1.View3D.Wall.Thickness = 0; chart1.View3D.BackWallVisibility = Visibility.Collapsed; chart1.AxisX.Visibility = Visibility.Collapsed; chart1.AxisY.Visibility = Visibility.Collapsed; chart1.GalleryTemplates = ChartFX.WPF.Motifs.Edge.GalleryTemplates; chart1.AllSeries.StackedStyle = StackedStyle.Normal; DockPanel.SetDock(chart1.LegendBox, Dock.Bottom); chart1.Series.Add(new SeriesAttributes("Meeting")); chart1.Series.Add(new SeriesAttributes("Preliminary")); chart1.Series.Add(new SeriesAttributes("Revised")); List<DataItem> data = new List<DataItem>(); data.Add(new DataItem(2, 8, 2)); chart1.ItemsSource = data; chart1.MouseClick += new HitTestEventHandler(OnMouseClick); Note that in order to set cylinder bar we are setting a property called GalleryTemplates to a prebuilt resource in a separate assembly (ChartFX.WPF.Motifs) so you have to make sure you add a reference in your project. Also note that I am assuming a DataItem class with 3 double properties (Meeting, Preliminary and Revised) as your data layer. The OnMouseClick would check for HitTestEventArgs.Series JuanC
  6. SQLExpress does not listen to remote connections by default, I followed the steps on the following post and I was able to connect from PG running on another machine, note that sometimes you might get just the machine name in the combo box (if you enable and start SQL Server Browser service) but to connect to SQLExpress you have to provide the instance name, e.g. MachineName\SQLEXPRESS JuanC
  7. Are you trying to use a simple cmdlet, e.g out-chart Or are you trying to open (double click) a PGF file? Can you try creating a dummy PGF that does not connect to any data to see if we can isolate the problem? JuanC
  8. Are you experiencing this issue using ChartFX for WPF? You mentioned you found others with similar problems but I don't think I have seen that issue often in WPF. If the problem is using other technology (WinForms, WebForms, Reporting Services, etc.) please repost in the appropiate forum, if the issue is using ChartFX for WPF please provide a repro case. JuanC
  9. We do not have an available gallery "heatMap" but we are always on the lookout for new gallery types to support. I am guessing the data has several series "2001, 2002, etc." and several points "MSFT, APPL, etc." and numbers for each one of these. You will probably also want to customize the color scale. We could show the scale as part of our legend box. I will try to create a prototype for this and let you know how it goes. JuanC
  10. You can use our built-in selection code by executing this code on a button chart1.Selection.StartMouseSelection( new MouseSelectionHandler(OnEndSelection), null); private void OnEndSelection (object sender, MouseSelectionArgs args){ PointAttributes p = new PointAttributes(); p.Effects.Add(new ChartFX.WPF.DarkerEffect(30)); foreach (SeriesPoint seriesPoint in args.SelectedMarkers) { Debug.WriteLine(string.Format("Series: {0} Point {1} Y {2} X {3}", seriesPoint.Series.Content, seriesPoint.Point, seriesPoint.Value, seriesPoint.XValue)); chart1.Points[seriesPoint.SeriesIndex, seriesPoint.Point] = p; }} The last parameter in the StartMouseSelection method call allows to you change the template used to paint the selected region. JuanC Chart.zip
  11. You can control each buketing format separately using the following syntax // <day format>;<month format>;<abbreviated year format>;<quarter format>;<year format>A way to completely disable the bucketing would be for you to set up the AxisX step, note that this property is of type unit so you can pass a TimeSpan if your axis has dates, e.g. chart1.AxisX.Labels.Format = ChartFX.WPF.AxisFormat.DateTime;chart1.AxisX.Labels.Angle = 90;chart1.AxisX.Step = new TimeSpan(365, 0, 0, 0); We interpret some magic numbers, e.g. 365 days means a year, 30 days means a month. Note that using this approach might result in label overlap if the chart is resized to a size where the default format (or your own if you use CustomFormat) does not fit.JuanC
  12. JuanC

    Hotfix installs

    Some of our hotfix/service pack pages feature a download button along the install button, we will check if we are not enabling this on the WPF hotfix page. In WPF the hotfix just udpates your ChartFX.WPF.*.dlls as well as design time dlls in the Design subfolder. If you want to apply the hotfix to a build machine you can safely copy all these files. Note that if you never open an project interactively in the build machine you do not even need to worry about the Design subfolder. JuanC
  13. You need something like ExportImageSettings settings = new ExportImageSettings(); settings.DPI = 300; and then use settings as the last parameter in the Export call that receives an extra object parameter. The class ExportImageSettings existed before but the DPI member was added in build 3733 JuanC
  14. If you are using powershell and out-gauge you can do something like this GetYourData | out-gauge -value {$_.Trials} Where Trials is the name of the property/column you are interested in. Note that if your SQL returns multiple rows we will use only the first one. Unfortunately we do not expose the UI to choose the column for a gauge in the PowerGadgets Creator. Note that you can open a PGF in notepad and add the following inside the <Window> tag for the appropriate gauge <Data.PropertyCount>1</Data.PropertyCount> <Data.Property0>MainValue</Data.Property0> <Data.Property0ScriptBlock>$_.Trials</Data.Property0ScriptBlock> JuanC
  15. The bad news is that current builds are hardcoded to use 96 dots per inch. The good news is that as you already noted, there is an Export overload that receives a settings object. You can use an object of type ExportImageSettings to customize the image generation process (sorry for the lack of docs), builds marked 3733 or later will support a DPI property to allow you to change the image resolution. The change is very small so the new build should be available in a day or two. JuanC
  16. >> This does not appear to be a WPF thread safety issue, but a ChartFX one. >> It seems that you are statically caching a BlurBitmapEffect instance on the Chart class: We are not caching a BlurBitmapEffect (at least not intentionally), to test this try the following modifications to your RenderMockChart function private void RenderMockChart (){ int w = 300; int h = 300; MockUserControlWithEffect mockControl = new MockUserControlWithEffect(); mockControl.Measure(new Size(w, h)); mockControl.Arrange(new Rect(0, 0, w, h)); RenderTargetBitmap rtb = new RenderTargetBitmap(w, h, 96, 96, PixelFormats.Pbgra32); rtb.Render(mockControl); } MockUserControlWithEffect.cs using System;using System.Windows.Controls; namespace InternalTest { public partial class MockUserControlWithEffect : UserControl { public MockUserControlWithEffect () { InitializeComponent(); } } } MockUserControlWithEffect.xaml <UserControl x:Class="InternalTest.MockUserControlWithEffect" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="120" Width="120"> </UserControl> App.xaml <Style TargetType="{x:Type local:MockUserControlWithEffect}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type local:MockUserControlWithEffect}"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="20"/> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Rectangle Grid.Row="1" Fill="DarkRed"> <Rectangle.BitmapEffect> <BlurBitmapEffect/> </Rectangle.BitmapEffect> </Rectangle> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> This code throws an exception the second time you hit the button without using any ChartFX code. Interestingly if you set the visuals inside the MockUserControlWithEffect.xaml instead of defining a default style, the exception does not occur so WPF is caching the BlurBitmapEffect when using styles even though all they were supposed to do was clone it when a new MockUserControlWithEffect was instantiated. Unfortunately ChartFX uses this technique (which I think is the recommended way to create look-less controls). We just noticed when writing this post that if we use the new Effect API (BitmapEffect was made obsolete in WPF 3.51) then it does not throw an exception <Rectangle.Effect> <BlurEffect/> </Rectangle.Effect> So it seems that the WPF bug is related to BitmapEffects in particular. Even though it would be a very simple change for us to make, we have tried to make sure we do not force a specific framework version to our users. We will discuss this internally as AFAIK even though ChartFX for WPF works with .NET 3.0, at design time we are already forced by a VS 2008 bug to require 3.5 SP1. Feedback as always, would be greatly appreciated. Note that the reflection at the bottom uses a different technique so I am still not sure if you would get the reflection consistently when exporting the chart on a background thread. JuanC
  17. To install a hotfix you have to - Make sure you run IE as Administrator if UAC is enabled in your machine - Click here Please note that hotfixes go through less testing than service packs. JuanC
  18. You are correct the "square space" available for the pie was being used for the title (and also outside labels), we have uploaded a new build (3729) as a hotfix that should fix this issue. Please let us know if it works for you. JuanC
  19. Overwriting OnApplyTemplate will probably not work because we build out our visual tree from many different parts where one of them is the legend box. A simple but not very elegant solution would be to include the style "in-place" in your xaml instead of using it as a resource, e.g. < cfx:Chart Gallery="Bar" x:Name="chart1"> <cfx:Chart.Series> <cfx:SeriesAttributes/> <cfx:SeriesAttributes/> </cfx:Chart.Series> <cfx:Chart.LegendBox> <cfx:LegendBox> <cfx:LegendBox.ContainerStyle> <Style TargetType="{x:Type ItemsControl}"> <Style.Setters> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ItemsControl}"> <Expander x:Name="expLegend" Header="Legend Box" Foreground="White" Expanded="OnLegendExpanded">By placing the style directly in your window/page xaml you will be able to hook to the OnLegendExpanded function in your class. We will research alternative options to accomplish this. JuanC
  20. There is a registry value at HKEY_LOCAL_MACHINE\Software\Software FX, Inc.\PowerGadgets\1.0 called ExecutionPolicy with the following possible values: AllSigned Only allow digitally signed PGFs to be run, the signature has to be trusted in the computer RemoteSigned Only run remote files if they have been signed, remote files are file that were downloaded by Internet Explorer and similar apps. You can check if a file is remote by viewing its properties and checking if there is an unblock button. Unrestricted Run all files Our default value is AllSigned if the registry key is not found. Please note that you should only run PGFs from trusted sources, because a PGF is running as the currently logged user and can invoke powershell scripts it could run malicious code. If you are running a very old PowerGadgets build you might have to replace "Software FX, Inc." with "PowerGadgets, LLC" in the registry key. JuanC
  21. Can you post a sample PS1 along with any steps we have to execute to duplicate this problem? JuanC
  22. PowerGadgets have 2 personalities: 1) PowerShell: Out-Chart, Out-Gauge: these cmdlets allow you to pass Powershell objects, customize the visual attributes using the command line and optionally save/load a template file to reuse these customizations. Note that although we allow you to "send" a chart/gauge to an existing gadget, they still only know about 1 element. We do support exporting to files using these cmdlets. 2) PGF: An xml file that contains 1 or more elements (charts, gauges, etc.), you can run these by double clicking them. In this case you are not using cmdlets (unless you are connecting the elements to powershell data, but you are not using out-chart/out-gauge). Note that a single PGF supports more than 1 chart/gauges (with a next-previous metaphor). Currently we do not allow you to export an image when running a PGF file, we will definitely consider adding this for the next version (which will include some interesting new features) but it would probably only work if the PGF in question only has 1 element as we currently only display one item at a time. JuanC
  23. We will be uploading a new service pack/hotfix (3588) soon that should fix some of these PowerShell 2.0 / Windows 7 issues. JuanC
  24. Have you tried setting the AnimationSpan in the internal gauge (using the Property Grid) ? JuanC
×
×
  • Create New...