Jump to content
Software FX Community

JuanC

Staff
  • Posts

    863
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JuanC

  1. You should not use export for print/print preview. Printing a chart requires you to use standard WPF printing API. JuanC
  2. This issue should be fixed on build 3868 or later. You can download our most recent hotfix here (make sure you run IE as an Administrator if UAC is enabled). JuanC
  3. We do not support exporting the data in any format except as an image. This is a feature we do have in our WinForms product (exporting the data as CSV) so we will consider adding this to WPF in future versions. JuanC
  4. If you are using PixelToValue note that we return a DataUnit which have intrinsic castings to dates so you can write the following DateTime d = chart1.AxisY.PixelToValue(300);If you are using other API that returns a double you can use the following code DateTime d2 = DataUnit.DoubleToDate(500);Also note that most of our data-related properties are DataUnit so you can pass a DateTime directly to AxisY.Min/Max etc. JuanC
  5. If you check the properties for the AxisY object you will find the following // This changes the decimals used for the Y axis labels chart1.AxisY.Labels.Decimals = 3; // This changes the decimals used when displaying data (e.g. tooltip) chart1.AxisY.DataFormat.Decimals = 4; JuanC
  6. JuanC

    Point presenter

    Yes, you can use DataItem.YourOwnPropertyGoesHere in triggers, to change rectangle properties you have to use TargetName as follows <DataTrigger Binding="{Binding Path=DataItem.HasDiscount}"> <DataTrigger.Value> <sys:Boolean>True</sys:Boolean> </DataTrigger.Value> <Setter TargetName="marker" Property="Fill" Value="Gold" /> </DataTrigger> JuanC
  7. JuanC

    Point presenter

    I am assuming because of the question that you are referring to a scatter/line/curve chart, note that templating a chart is a little more involved than templating a datagrid because of the different plot styles (bar, line, pie, scatter, etc.) as well as the number of properties these elements support. To change the template used in a marker you would use the following template <DataTemplate x:Key="MarkerRect"> <Rectangle x:Name="marker" Width="{Binding Path=Width}" Height="{Binding Path=Height}" Fill="Purple" Stroke="{Binding Path=MarkerStroke}" StrokeThickness="{Binding Path=MarkerStrokeThickness}" Opacity="{Binding Path=MarkerOpacity}"/> <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> And the following code chart1.AllSeries.Marker.Template = (DataTemplate) FindResource("MarkerRect"); Note that you can also set the template in XAML but it takes a couple more lines, in the template I changed the Rectangle Fill to Purple so that you can easily check if the template is being applied (it would normally be bound to MarkerFill to honor the Series.Fill API). This template's data context is a ChartFX class that exposes a property called DataItem that points to the CLR object you passed to ChartFX. This will allow you to change visual attributes based on your own properties. JuanC
  8. Currently we do not offer any public API that would allow you to highlight or remove highlight from series/points. In version 8.1 (currently in development) we will add some helper methods to the HighlightAttributes class. JuanC
  9. If you are talking about TrueCondition, this is a condition that always evaluates to True. Currently we do not have a condition tailored to flag boolean properties, we will check if we can modify RangeCondition to support them. JuanC
  10. Does the tooltip fails to work even if the mouse is not directly over the line you are moving? You might want to try setting IsHitTestVisible for this line to false to let mouse events go through it. JuanC
  11. JuanC

    Mouse Position

    Have you compared the point you are passing to the HitTest methods as well as the PositionRelativeToPlotArea value between the mouse down and mouse up position (assuming you are not dragging the mouse)? If the chart has not changed I am not sure how subsequent calls with the same value would not return the same PositionRelativeToPlotArea and in turn the same X/Y values. Have you tried also calling this (for testing purposes) on your MouseMove event? JuanC
  12. I am not sure if I am understanding correctly, but if you are using creator and pointing your gadget to a ps1, this ps1 should only return data, it should not do out-chart/out-gauge JuanC
  13. It should work as well, if you can please post some sample code of the kind of query you are trying to run. JuanC
  14. Glad it helped. The RenderBeforeLoad setting was done to tweak a different behavior, I am not sure if it will help you to export a chart that has never been rendered. JuanC
  15. I can easily replicate the blank image with any WPF control (e.g. a button) if the code runs before the particular tab where the control lives is ever displayed. Once a tab is visited, and no longer the current tab, other WPF controls will keep their visuals but we found that for the chart it made more sense to tear down those visuals to keep memory usage at a minimum. You can override this behavior with the following code chart1.AdvancedSettings |= ChartSettings.KeepVisualsOnUnload; You should not need to use any threading code for this to work. JuanC
  16. We are not able to replicate a case where Zoom.Mode does not work after beeing set. Please post a small sample app that reproduces this issue. JuanC
  17. To achieve the chart you are looking for you will in fact need to use the CrosstabTransform, whether you can use an existing attribute to tell the crosstab transform which entries "belong" to the same point or not will depend on your data, e.g. you could use EmployeeID or Name instead of adding Year if showing these labels would make sense for your users. About the performance hit, crosstab will have a performance hit (should not be too bad) but even if you didn't use it you have to seriously consider/test if WPF and our control can handle processing 6000 records every 2 seconds and if the user will be able to process this information and act on it. JuanC
  18. Unfortunately in WPF controls do not "paint" themselves as before (Win32 and other environments) but instead they generate visuals in a retained mode, so generating an image depends on creating those visuals. We have some code that will try to render charts that have not been painted but it only does so when called on a backround thread, please try creating a thread, setting the IsBackground property to see if this makes any difference. To generate the image we eventually rely on RenderTargetBitmap to take a visual and generate an image, Note that if you try to use this sample code it will generate a correct image if the control has been rendered but will generate a black image if the control has not been rendered yet. Stream stream = File.Create("C:\\Temp\\Button.png"); PngBitmapEncoder pngEncoder = new PngBitmapEncoder(); RenderTargetBitmap rtb = new RenderTargetBitmap(width, height, 96, 96, PixelFormats.Pbgra32); rtb.Render(yourControlGoesHere); pngEncoder.Frames.Add(BitmapFrame.Create(rtb)); pngEncoder.Save(stream); stream.Close(); JuanC
  19. I understand you want Sales to control the Y axis but it is not clear what would control the X axis ? StartDate? EmployeeID? Can you post a more complete data set along with a sketch of how the chart should look? JuanC
  20. >> About disabling interaction while zooming Although it is relatively easy for us to add a flag to change that behavior we will need to test this as both actions (zooming and other actions) might negatively interfere with each other >> About the two charts Zooming on both charts should be completely independent, make sure you use the proper chart object on your event handlers (OnBound, OnEndSelection) JuanC
  21. Your code is fine, the custom grid line default template was incorrectly using IsHitTestVisible false (we do this for the normal gridlines). Also our code was not properly detecting the mouse over the custom gridline title. Both issues will be fixed on our next hotfix (build 3842 or later) early next week. JuanC
  22. About the issue not being fixed: Can you duplicate the issue in a sample app without using Actipro docking? Did you check the bin folder of your app to make sure the hotfix got properly installed? In our tests we can continue mouse selection. About cancelling the operation if the user has not pressed the mouse in the chart you should be able to set the Zoom.Mode to Off. JuanC
  23. To change some of the points you have the following options 1) You can use the Chart.Points[series, point] API which gives you a class similar to a chart Series where you can change fill color, marker attributes, point labels, etc. 2) Use the ConditionalAttributes API, we expose an API where you can specify a condition and what attributes to change and we take care of the rest. You can also show the condition in the legend window to use highlight You could also expose some properties directly from your CLR objects and change the templates to use some of those properties but it is more complicated. JuanC
  24. Chart.Data exposes some of the data attributes but to change visual attributes you would probably use AllSeries or Series JuanC
  25. We have a feature in a non-XY line chart where the marker size will decrease if the points are close together and at some point will dissapear, e.g. if you have more points than pixels the markers would just hide the trend line obscuring the plot. If you have an XY chart (or you are setting the Marker Size manually) with hundreds of thousands of points I am afraid there are not a lot of options - Change the Marker templates used in the chart using the MarkerTemplates property, e.g. chart1.MarkerTemplates = ChartFX.WPF.Motifs.Basic.MarkerTemplates, our default templates might be a little too complex for your scenario. - Hide the markers To try to measure the "blame" you might want to try creating a canvas and adding hundreds of thousands of visuals, note for example that if you resize the chart we have to calculate the new position for all the visuals and move them. I think WPF in general with current hardware still does not scale to this level, also note that unless you are using scrolling we cannot do any virtualization as all markers are visible. JuanC
×
×
  • Create New...