Jump to content
Software FX Community

JuanC

Staff
  • Posts

    863
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JuanC

  1. ChartFX.XBAP uses the same API (class names, properties, even namespaces) as ChartFX.WPF so you should be able to use ChartFX.WPF in a sample WPF app (non browser hosted). This will also remove the strong name limitation as you will not need to use SetLicenseString. JuanC
  2. It would be something like this <cfx:Chart.AllSeries> <cfx:AllSeriesAttributes> <cfx:AllSeriesAttributes.Template> <DataTemplate> <Canvas> <Polyline Points="{Binding Path=Points}" Stroke="Transparent" StrokeThickness="10" StrokeMiterLimit="1"/> <Polyline x:Name="points" Points="{Binding Path=Points}" Stroke="{Binding Path=Stroke}" StrokeThickness="{Binding Path=StrokeThickness}" StrokeDashArray="{Binding Path=StrokeDashArray}" Opacity="{Binding Path=Opacity}" StrokeMiterLimit="1"/> </Canvas> <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:AllSeriesAttributes.Template> </cfx:AllSeriesAttributes> </cfx:Chart.AllSeries> This is a copy of our simple line template but I added a transparent PolyLine that increases the tooltip area of the line. JuanC
  3. Unfortunately we do not support this, the bars will use all the available horizontal space. Can you post a screenshot of the chart you are looking for, we have an extension gallery that uses X and Y to draw arbitrary sized rectangles that could be useful. JuanC
  4. Instead of setting the step you might want to try changing the number of decimals used in the Y axis. chart1.AxisY.Labels.Decimals = 2; chart1.AxisY.DataFormat.Decimals = 3; The first line would only affect the axis labels while the second would affect things like tooltips. If the data range is variable you could do something like this chart1.DataBound += new EventHandler(OnChartBound); private void OnChartBound (object sender, EventArgs e) { if ((chart1.AxisY.Max - chart1.AxisY.Min) < 2) chart1.AxisY.Labels.Decimals = 2; } JuanC
  5. Which gallery type are you using? Are you using a specific motif/style? We do not have an API that would increase the tooltip area but this is something that could be achieved by providing your own gallery template that adds some trasparent shape around the visuals that represent the data. JuanC
  6. Please download build 4125 or later from our hotfix page. It should fix this issue allowing you to get back the no-data message when using bindings. JuanC
  7. Are you using Data Transforms? Can you post a small sample app that shows the issue? Regards, JuanC
  8. Series.Opacity should allow you to change the transparency of a specific series, a value of 1 means opaque while a value of 0 means full transparency. JuanC
  9. Note that in an stacked area chart the series are drawn from bottom to top, i.e. the first series is draw first from 0 to the series values, then the second series is drawn from the previous series values. We do not have an API that allows you to change this order (or the Z order if we were talking about a non-stacked) chart so you will have to change the order in which you add the series to the chart. JuanC
  10. We have code that tries to align panes but only when there is one one axis on the "aligned" side of each pane. If this works for your particular scenario moving one of the axes to the right in the second pane should fix the misalignment. ax2.Position = AxisPosition.Far;JuanC
  11. We do not support moving and/or sizing annotations as we do in WinForms. You might want to try to use the Adorner API, note that this sample will draw adorners around all annotation elements, you would probably want to play with the visibility so that only one of them is visible at a time and also handle event to support moving and/or sizing AdornerLayer myAdornerLayer = AdornerLayer.GetAdornerLayer(chart1); foreach(UIElement uiElem in annotations.Children) myAdornerLayer.Add(new SimpleCircleAdorner(uiElem)); You can use the SimpleCircleAdorner class and more info about the Adorner API here JuanC
  12. Have you checked when the NullReferenceException occurs? I tested placing the legend inside using XAML <cfx:Chart Name="chart1" Border="{x:Static cfx:Borders.Classic}" Palette="{x:Static cfx:Palettes.Basic}" Style="{x:Static cfxmotifs:Simple.Style}"> <cfx:Chart.LegendBox> <cfx:LegendBox cfx:Chart.TargetPanel="Inside" HorizontalAlignment="Right" VerticalAlignment="Top"/> </cfx:Chart.LegendBox></cfx:Chart> I also tried using code in the Page_loaded method instead of XAML as follows Chart.SetTargetPanel(chart1.LegendBox, "Inside");chart1.LegendBox.HorizontalAlignment = HorizontalAlignment.Right;chart1.LegendBox.VerticalAlignment = VerticalAlignment.Top; Both ways worked fine. If you try any of these and they fail you might want to download our most recent hotfix. JuanC
  13. We have been able to duplicate this issue and a future hotfix should take care of this. In the meantime and as a workaround to this issue, you can set the ContentTemplate (instead of setting the Content to a Visual) as follows <cfx:Chart.Titles> <cfx:Title ContentTemplate="{Binding Source={StaticResource titleTemplate}}" /> You might also have to set the Content to allow your bindings to work, try first with a simple titleTemplate, e.g. a stackpanel with a rectangle and hardcoded text to make sure the workaround works for you. JuanC
  14. 2) You can use the Chart.Selection.StartMouseSelection method, you can pass a null template to use our default selection template, we will notify the handler when the selection is finished. The handler receives a MouseSelectionArgs that provides you with the From and To as points, you can use Axis.PixelToValue to convert these coordinates to axis values, MouseSelectionArgs also provides a helper property Markers which will return all the markers selected by the user. JuanC
  15. We have fixed this issue on build 4100. This should be available tomorrow. JuanC
  16. JuanC

    Chart Title

    Our default style (glass) places the first chart title on a different container that is not aligned to the plotarea. If you are using the basic or simple motif, then you can set the AlignToPlotArea dependency property on your title as follows xmlns:cfxControls="clr-namespace:ChartFX.WPF.Controls;assembly=ChartFX.WPF" <cfx:Chart.Titles> <cfx:Title cfxControls:SpacingDockPanel.AlignToPlotArea="false">A very long title that is not aligned to the plot area</cfx:Title></cfx:Chart.Titles> This should also work if you are creating your own style. JuanC
  17. The following XAML shows how to change the style of the legend box <cfx:Chart Gallery="Bar"> <cfx:Chart.LegendBox> <cfx:LegendBox ContainerStyle="{StaticResource tooltipLegend}" /> </cfx:Chart.LegendBox></cfx:Chart> The following 2 styles will display a collapsible legend box as well as a placeholder (red rectangle) showing the legendbox as a tooltip. <Style x:Key="collapsibleLegend" TargetType="{x:Type ItemsControl}"> <Style.Setters> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ItemsControl}"> <Expander x:Name="expLegend" Header="Legend Box"> <ItemsPresenter /> </Expander> </ControlTemplate> </Setter.Value> </Setter> </Style.Setters></Style><Style x:Key="tooltipLegend" TargetType="{x:Type ItemsControl}"> <Style.Setters> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ItemsControl}"> <Rectangle Width="16" Height="16" Fill="Red" Stroke="Black"> <Rectangle.ToolTip> <ItemsPresenter /> </Rectangle.ToolTip> </Rectangle> </ControlTemplate> </Setter.Value> </Setter> </Style.Setters></Style> JuanC
  18. Unfortunately because of the way we setup our logical tree, you will not be able to bind the series gallery (or any other series property for that matter) to a property in your data. We will research if we can enable this scenario in future versions. JuanC
  19. There is a bug where we are erroneously setting the legend box datacontext and because of this your binding does not work. This issue should be fixed on any hotfix version 4087 or greater which should be available next week. JuanC
  20. I think we fixed this issue a while ago, can you please install the most recent hotfix. You can download our most recent hotfix here (make sure you run IE as an Administrator if UAC is enabled). JuanC
  21. We have been unable to reproduce this issue, can you please try installing our most recent hotfix, this page works for both trial and release users. Make sure you run IE as an Administrator as this page hosts an active control that will update the Chart FX DLLs JuanC
  22. Although WPF is hardware accelerated there are some performance differences between WPF and GDI related to how elements are painted. Unfortunately We do not have any samples for performance testing. In Chart FX for WPF I would recommend you try the following if performance is not satisfactory - Change the Style which controls most of the visuals of the chart, e.g. chart1.Style = ChartFX.WPF.Motifs.Basic.Style; - Set UseVisuals to false, this will use low-level rendering which sometimes is faster but you will lose the templatibility of the galleries. JuanC
  23. >> select data on a chart with mouse by dragging like rectangle then retrive data relevant to index or Y value This is possible, you need to use the Chart.Selection.StartMouseSelection method and supply a delegate that will be called after the user draws the selection rectangle. >> We'd like to do something like jobs such as adding limit lines for available data on already displayed charts. There are several ways to accomplish this, if you only need horizontal/vertical lines you can use Axis.CustomGridLines, we also support annotations where you can create visuals (lines, buttons, etc.) and attach them to logical positions in the chart. Finally we also support for you to handle an event to render additional elements in the chart, please note that because of the differences between GDI and WPF you will normally not paint on the screen but instead create logical items that are in turn templated into visuals. JuanC
×
×
  • Create New...