Jump to content
Software FX Community


  • Content count

  • Joined

  • Last visited

Everything posted by JuanC

  1. ChartFX 6.2 with Windows 10 Version 1803

    Please try downloading the most recent hotfix for ChartFX Client Server 6.2 (as of this post the most recent public build is 6.2.6134) and try again. If the problem persists, please send us the source of the smallest sample application that replicates the issue. Regards, JuanC
  2. Contour map chart

    Unfortunately we do not support XYZ charts in any of our WinForms versions. Regards, JuanC
  3. I am not too familiar with iTextSharp but it seems to be a PDF creation library so I would say creating an image (they way you are probably doing it) is the way to integrate charts into it. Regards, JuanC
  4. Exception error

    I would recommend using Fusion Log Viewer (fuslogvw) to try to pinpoint why the assembly is not being found. Regards, JuanC
  5. Build Error on Jenkins Server

    Please contact products at softwarefx dot com as you might need an updated component and/or license information. We cannot handle licensing issues in this forum. Regards, JuanC Edit: Replaced support with products as email alias to use
  6. ChartFX For WPF 8.1 has no ToolBar ?

    Yes, there is zoom functionality. It is exposed in the Zoom property of the chart, if you want to expose a "zoom" button in your own toolbar you could do chart1.Zoom.Mode = ZoomMode.Selection; There is also a separate magnifier mode that you can enable with chart1.Zoom.Magnifier.IsEnabled = true; Regards, JuanC
  7. ChartFX For WPF 8.1 has no ToolBar ?

    That is correct, ChartFX WPF 8.X has no ToolBar. Regards, JuanC
  8. User handle leak calling Chart.Reset()

    Yes, I was referring to the latest ChartFX 7 build. Any build marked 7.0.6305 or later should include the fix. Regards, JuanC
  9. User handle leak calling Chart.Reset()

    We were failing to dispose a child control, this has been fixed on our latest build, note that this control AFAIK would still be properly disposed in the next GC but clearly if you run multiple Reset calls in a tight loop it might cause some problems. Regards, JuanC
  10. User handle leak calling Chart.Reset()

    Please note that Chart.Reset is meant to be used if you have a "dirty" chart that you need to reset to its original state, e.g. a chart with data and several settings that you need to reset back. You mentioned you are doing this as part of the initialization process so I wonder why you are using Reset. The code for reset reinitializes the chart using our serialization process but does not show an obvious leak, can you clarify how are you detecting this leak? Regards, JuanC
  11. How to simplify the charts appearance?

    I would recommend you start changing the style to one of our simpler styles such as "Basic" or "Simple", e.g. chart1.Style = ChartFX.WPF.Motifs.Basic.Style; To remove the gradient background, change the background property to a solid brush, e.g. chart1.Background = Brushes.White; After that you can configure colors or other properties as desired. JuanC
  12. out-gauge

    I apologize for the issue with the email address, please resend your email to products at softwarefx dot com, if possible include a link to this thread so that it can get routed appropriately. JuanC
  13. out-gauge

    Can you please send us one of the powershell scripts that worked when you uninstalled powershell 3.0 and stopped working after reinstalling powershell 3.0? You can send it to support at softwarefx dot com, if it has proprietary information in you can send us an edited version with the out-gauge parameters only as I do not think it depends on the data. It is probably a bug related to one of the parameters or powergadgets template you are using. JuanC
  14. Interrupted line in series

    The special value we use in ChartFX for WPF to "interrupt" a line is Chart.Hidden so before passing the data to the chart you might have to replace 0s with Chart.Hidden. If you are passing CLR objects you can add a property to your objects where you do this translation. JuanC
  15. PowerGadgets saves gadgets user settings (position, chart attributes, etc.) in the following directory <UserFolder>\AppData\Roaming\Software FX, Inc\PowerGadgets\VersionNumber\Personalization Please note that the AppData folder is hidden by default. Since Vista this folder is located at C:\Users\YourUserName\AppData, in XP it was located at C:\Documents and Settings\YourUserName\Application Data. Where VersionNumber might be 1.0 or 2.0 Cleanup this folder to check if the missing gadgets are caused by corrupt settings. You can also turn off personalization on a per-gadget basis in the PowerGadgets Creator. Regards, JuanC
  16. Pie Chart, forcing labels inside.

    Note that to set the font size to scale so that the percentage fits in the slice you would do ChartFX.WPF.Galleries.Pie pie = (ChartFX.WPF.Galleries.Pie) chart1.AllSeries.GalleryAttributes; pie.ScaleLabels = true; There is no way to force inside labels without scaling them, please let is know if this works for your scenario. JuanC
  17. We uploaded a new hotfix containing this fix (and a couple of other fixes). Hotfixes do not have the same level of testing as service packs so they can be provided in a more agile manner.JuanC
  18. To hide the axis labels (and reduce space occupied by it) you can try the following code chart1.PlotArea.Margin = new Thickness(0, 0, 0, 0); chart1.AxisY.Labels.Visibility = AxisLabelVisibility.Collapsed; chart1.AxisY.Grids.Major.TickMark = TickMark.None; chart1.AxisY.Grids.Major.TickSize = 0; chart1.AxisY.Grids.Minor.TickMark = TickMark.None; chart1.AxisY.Grids.Minor.TickSize = 0; chart1.AxisY.Separation = 0; Note that there will be a small space (about 2-3 pixels). In our next 8.1 build this should be reduced. If you are also hiding the X axis you could remove the chart's outside border so that you do not get the "double border" effect. Regards, JuanC
  19. If you have a chart with multiple series and need to provide UI to show/hide series, you can use styling on the legend box items to display a checkbox for each series. [color= red]xmlns[/color][color= blue]:[/color][color= red]cfxConverters[/color][color= blue]="http://schemas.softwarefx.com/chartfx/wpf/80/converters"[/color] [color= blue]<[/color][color= #a31515]DataTemplate [/color][color= red]x[/color][color= blue]:[/color][color= red]Key[/color][color= blue]="CheckLegend"> <[/color][color= #a31515]DataTemplate.Resources[/color][color= blue]> <[/color][color= #a31515]cfxConverters[/color][color= blue]:[/color][color= #a31515]VisibilityToBooleanConverter [/color][color= red]x[/color][color= blue]:[/color][color= red]Key[/color][color= blue]="VisibilityToBool" [/color][color= red]FalseVisibility[/color][color= blue]="Hidden"/> </[/color][color= #a31515]DataTemplate.Resources[/color][color= blue]> <[/color][color= #a31515]Grid[/color][color= blue]> <[/color][color= #a31515]Grid.ColumnDefinitions[/color][color= blue]> <[/color][color= #a31515]ColumnDefinition [/color][color= red]Width[/color][color= blue]="Auto" /> <[/color][color= #a31515]ColumnDefinition [/color][color= red]Width[/color][color= blue]="Auto" /> <[/color][color= #a31515]ColumnDefinition [/color][color= red]Width[/color][color= blue]="*" /> </[/color][color= #a31515]Grid.ColumnDefinitions[/color][color= blue]> <[/color][color= #a31515]CheckBox [color= red]Margin[/color][color= blue]="2,0" [color= red]VerticalAlignment[/color][color= blue]="Center" [/color][/color][/color][color= red]IsChecked[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=Visibility, [/color][color= red]Converter[/color][color= blue]={[/color][color= #a31515]StaticResource [/color][color= red]VisibilityToBool[/color][color= blue]}}" [/color][color= blue]/> <[/color][color= #a31515]Rectangle [/color][color= red]Stroke[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=Stroke}" [/color][color= red]Fill[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=Fill}" [/color][color= red]Grid.Column[/color][color= blue]="1" [/color][color= red]Width[/color][color= blue]="12" [/color][color= red]Height[/color][color= blue]="12" [/color][color= red]VerticalAlignment[/color][color= blue]="Center" [/color][color= red]Margin[/color][color= blue]="2,0" /> <[/color][color= #a31515]TextBlock [/color][color= red]FontFamily[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=FontFamily}" [/color][color= red]FontSize[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=FontSize}" [/color][color= red]Text[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=Text}" [/color][color= red]Grid.Column[/color][color= blue]="2" [/color][color= red]VerticalAlignment[/color][color= blue]="Center" [/color][color= red]Margin[/color][color= blue]="2,0" /> </[/color][color= #a31515]Grid[/color][color= blue]></[/color][color= #a31515]DataTemplate[/color][color= blue]>[/color] Unfortunately templating items in the legend box has to be done in the code because of our API so we need to add the following line of code to our Window/Page Loaded event (we expect to support a XAML way to set these templates in future builds but you know what they say
  20. Sometimes the size available to a chart imposes a restriction where the legend just takes too much space. In this post we will discuss a couple of possibilities on how to approach this problem Style your title to mimic a legend In Chart FX for WPF titles are fully stylable and although typically titles are just strings, you can in fact use any WPF visuals in the title. The problem with this approach is that you would have to code too much information into the title, for example the number of series, colors, etc. which makes this scenario not practical. Also note that things like highlight would not work. Show the legend underneath the title Just removing the legend box border and docking the legend box to the top might be sufficient in many scenarios [color= blue] <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.Titles[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Title[/color][color= blue]>[/color][color= #a31515]Sales in 1998[/color][color= blue]</[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Title[/color][color= blue]> </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.Titles[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.LegendBox[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]LegendBox [/color][color= red]cfx[/color][color= blue]:[/color][color= red]Chart.DockBorder[/color][color= blue]="None" [/color][color= red]DockPanel.Dock[/color][color= blue]="Top" /> </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.LegendBox[/color][color= blue]>[/color] Note that in our default style (Glass) the main title is drawn larger and outside the plotting area space, if you would rather have them both together you can change the target panel of the legend box, note that in older builds we did not support a way to specify the index so you might need an updated build if this does not generate the expected results [color= blue]<[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.LegendBox[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]LegendBox [/color][color= red]cfx[/color][color= blue]:[/color][color= red]Chart.DockBorder[/color][color= blue]="None" [/color][color= red]DockPanel.Dock[/color][color= blue]="Top" [/color][color= red]cfx[/color][color= blue]:[/color][color= red]Chart.TargetPanel[/color][color= blue]="Titles-0" /> </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.LegendBox[/color][color= blue]>[/color] Combine the title and legend in one line If the number of series is small we might be able to combine the title text and legend box in one line. To do this we will have to style the legend box and items so it will be a little more involved, hopefully the result will be worthwhile. [color= blue]<[/color][color= #a31515]Style [/color][color= red]x[/color][color= blue]:[/color][color= red]Key[/color][color= blue]="LegendTitleStyle" [/color][color= red]TargetType[/color][color= blue]="{[/color][color= #a31515]x[/color][color= blue]:[/color][color= #a31515]Type [/color][color= red]ItemsControl[/color][color= blue]}"> <[/color][color= #a31515]Setter [/color][color= red]Property[/color][color= blue]="Template"> <[/color][color= #a31515]Setter.Value[/color][color= blue]> <[/color][color= #a31515]ControlTemplate[/color][color= blue]> <[/color][color= #a31515]StackPanel [/color][color= red]Orientation[/color][color= blue]="Horizontal"> <[/color][color= #a31515]StackPanel [/color][color= red]Orientation[/color][color= blue]="Horizontal" [/color][color= red]IsItemsHost[/color][color= blue]="True" [/color][color= red]VerticalAlignment[/color][color= blue]="Top" /> <[/color][color= #a31515]TextBlock [/color][color= red]VerticalAlignment[/color][color= blue]="Top" [/color][color= red]Text[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=Tag}"/> </[/color][color= #a31515]StackPanel[/color][color= blue]> </[/color][color= #a31515]ControlTemplate[/color][color= blue]> </[/color][color= #a31515]Setter.Value[/color][color= blue]> </[/color][color= #a31515]Setter[/color][color= blue]></[/color][color= #a31515]Style[/color][color= blue]><[/color][color= #a31515]DataTemplate [/color][color= red]x[/color][color= blue]:[/color][color= red]Key[/color][color= blue]="LegendTitleItem"> <[/color][color= #a31515]StackPanel [/color][color= red]Orientation[/color][color= blue]="Horizontal"> <[/color][color= #a31515]StackPanel.Resources[/color][color= blue]> <[/color][color= #a31515]cfxConverters[/color][color= blue]:[/color][color= #a31515]BoolToVisibilityConverter [/color][color= red]x[/color][color= blue]:[/color][color= red]Key[/color][color= blue]="BoolToVisibility"/> </[/color][color= #a31515]StackPanel.Resources[/color][color= blue]> <[/color][color= #a31515]StackPanel [/color][color= red]VerticalAlignment[/color][color= blue]="Top" [/color][color= red]x[/color][color= blue]:[/color][color= red]Name[/color][color= blue]="textAndLine"> <[/color][color= #a31515]Border [/color][color= red]Background[/color][color= blue]="Transparent"> <[/color][color= #a31515]ContentControl [/color][color= red]IsHitTestVisible[/color][color= blue]="false" [/color][color= red]Content[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=Content}" [/color][color= red]ContentTemplate[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=ContentTemplate}" [/color][color= red]Foreground[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=Foreground}" [/color][color= red]FontFamily[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=FontFamily}" [/color][color= red]FontSize[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=FontSize}" [/color][color= red]FontStyle[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=FontStyle}" [/color][color= red]FontWeight[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=FontWeight}"/> </[/color][color= #a31515]Border[/color][color= blue]> <[/color][color= #a31515]Rectangle [/color][color= red]Fill[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=Stroke}" [/color][color= red]Height[/color][color= blue]="3"/> </[/color][color= #a31515]StackPanel[/color][color= blue]> <[/color][color= #a31515]TextBlock [/color][color= red]Text[/color][color= blue]=" "/> <[/color][color= #a31515]TextBlock [/color][color= red]Text[/color][color= blue]="Vs " [/color][color= red]IsHitTestVisible[/color][color= blue]="false" [/color][color= red]Visibility[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=LastInGroup, [/color][color= red]Converter[/color][color= blue]={[/color][color= #a31515]StaticResource [/color][color= red]BoolToVisibility[/color][color= blue]}, [/color][color= red]ConverterParameter[/color][color= blue]=false}"/> </[/color][color= #a31515]StackPanel[/color][color= blue]> <[/color][color= #a31515]DataTemplate.Triggers[/color][color= blue]> <[/color][color= #a31515]DataTrigger [/color][color= red]Binding[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=Dimmed}"> <[/color][color= #a31515]DataTrigger.Value[/color][color= blue]> <[/color][color= #a31515]sys[/color][color= blue]:[/color][color= #a31515]Boolean[/color][color= blue]>[/color][color= #a31515]True[/color][color= blue]</[/color][color= #a31515]sys[/color][color= blue]:[/color][color= #a31515]Boolean[/color][color= blue]> </[/color][color= #a31515]DataTrigger.Value[/color][color= blue]> <[/color][color= #a31515]Setter [/color][color= red]Property[/color][color= blue]="Opacity" [/color][color= red]Value[/color][color= blue]="0.25" [/color][color= red]TargetName[/color][color= blue]="textAndLine" /> </[/color][color= #a31515]DataTrigger[/color][color= blue]> </[/color][color= #a31515]DataTemplate.Triggers[/color][color= blue]></[/color][color= #a31515]DataTemplate[/color][color= blue]>[/color] [color= blue]<[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.LegendBox[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]LegendBox [/color][color= red]cfx[/color][color= blue]:[/color][color= red]Chart.DockBorder[/color][color= blue]="None" [/color][color= red]DockPanel.Dock[/color][color= blue]="Top" [color= red]Tag[/color][color= blue]="Sales in 1998" [/color][/color][color= red]ContainerStyle[/color][color= blue]="{[/color][color= #a31515]StaticResource [/color][color= red]LegendTitleStyle[/color][color= blue]}"[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]LegendBox.ItemAttributes[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]LegendItemAttributes [/color][color= red]cfx[/color][color= blue]:[/color][color= red]LegendItemAttributes.LegendItemType[/color][color= blue]="Series" [/color][color= red]Template[/color][color= blue]="{[/color][color= #a31515]StaticResource [/color][color= red]LegendTitleItem[/color][color= blue]}"/> </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]LegendBox.ItemAttributes[/color][color= blue]> </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]LegendBox[/color][color= blue]> </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.LegendBox[/color][color= blue]>[/color] Key points from the XAML In LegendTitleStyle we set a template that has a horizontal stack panel (legend items) + the legend Tag, this allows to reuse this style as all we have to change is the LegendBox tag property. In LegendTitleItem we are showing the legend content with a line under it that uses the series stroke instead of fill, this makes the line a little darker. To hide the separator text (Vs) we used a ChartFX converter because it allows us to set Visibility to Collapsed when the bool property (LastInGroup) is true by setting ConverterParameter to false. The built-in BooleanToVisibilityConverter only seems to convert True to Visible. By using a ContentControl instead of a TextBlock our template should work even if you use Series.ContentTemplate to a more complex visual. Please note that the legend box can show much more than just the series as it can display information about conditional attributes, axis sections, axis custom gridlines, etc. but in simple scenarios this approach generates a simpler chart while still providing contextual information to your users. JuanC
  21. Data Transforms are a somewhat hidden but very important feature in Chart FX for WPF, although in essence they are simply a class that receives an enumeration and returns another, they can make a big difference on your charts. In this post we will discuss a simple transform called the OtherTransform, this transform groups small elements into an
  22. Minimizing Ink (Part 2)

    This post will add features to the sparkline chart built on our previous minimizing ink post and it is driven by comments and emails we have received about this topic. Q: One reader asks
  23. In part 1 we showed how to use the crosstab transform and the GridPanePanel to create a pane matrix where users can quickly compare multiple variables, in this post we will try to improve other aspects of the chart, one of the main differentiators WPF brings to the table is the use of data templates to include rich information about your data in any control. In our sample let
  24. This one is a little hard to describe but I am sure you have seen it before in magazines or newspapers. Although our API allows you to set brushes in code we will try to do all it XAML as it will allow more tweaking later. Here is our first attempt at showing an image on each bar [color= blue]<[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart [/color][color= red]Gallery[/color][color= blue]="Bar"[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.Series[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]SeriesAttributes[/color][color= blue]/> </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.Series[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.AllSeries[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]AllSeriesAttributes[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]AllSeriesAttributes.Template[/color][color= blue]> <[/color][color= #a31515]DataTemplate[/color][color= blue]> <[/color][color= #a31515]Canvas[/color][color= blue]> <[/color][color= #a31515]Rectangle [/color][color= red]Width[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=Width}" [/color][color= red]Height[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=Height}"> <[/color][color= #a31515]Rectangle.Fill[/color][color= blue]> <[/color][color= #a31515]ImageBrush [/color][color= red]ImageSource[/color][color= blue]="C:\Temp\WorldMap.png"/[/color][color= blue]> </[/color][color= #a31515]Rectangle.Fill[/color][color= blue]> </[/color][color= #a31515]Rectangle[/color][color= blue]> </[/color][color= #a31515]Canvas[/color][color= blue]> </[/color][color= #a31515]DataTemplate[/color][color= blue]> </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]AllSeriesAttributes.Template[/color][color= blue]> </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]AllSeriesAttributes[/color][color= blue]> </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.AllSeries[/color][color= blue]></[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart[/color][color= blue]>[/color] Nothing earth shattering, we are binding width and height of the rectangle to the Width and Height of the logical items we will create, note that we do not need to worry about Left and Top, this is handled internally. We are creating a Canvas because we plan to add more visual elements later. And this is what we get. Obviously this is not what we are looking for, actually there is no feature that I am aware of in WPF that allows you to draw a rectangle and specify the
  25. There are many cases when the data to be plotted must be analyzed considering multiple variables, for example you might want to track sales of multiple products in multiple regions and encompassing multiple years. Let