Jump to content
Software FX Community

DSimons

Members
  • Posts

    8
  • Joined

  • Last visited

DSimons's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Its not exactly what you're looking for, but I recently received this example from SoftwareFX. Attached is a 100% stacked area along with a line graph which should help you get started. Just change the 100% stacked area to a bar graph and you're good to go.
  2. Juan, Thanks for your reply! Does that imply that A) I discovered a small bug with the AffectedSeries in my post here? That you have been able to fix the bug and posted a hotfix as described in your post? If I have misunderstood this, could you post a quick reply addressing my question in the same post above ? Thanks again for your help, I think this will resolve all of my issues for thread when this is addressed or confirmed.
  3. Hi, I recently found some very strange behavior. Lets say I create a User Control which contains a basic ChartFX pie chart. If I place this usercontrol within a TabControl with two tabItems, if I tab back and forth between the two Tab Items (one containing the UserControl and the other containing nothing) the Pie Chart piece of the chart disappears. The Legend for the pie chart is actually still visible. See the attached VS2008 project to reproduce the issue. See the "Disappearing Pie Chart.JPG" within the attached .zip file for a picture example of what happens before and after clicking the TabItems back and forth. Please let me know if you can reproduce this bug, if you find any workarounds, and when you would expect it would be fixed. Thanks
  4. Hi, I have a very simple pie chart that holds two pieces of data - On & Off. I would like to have the pallete of the on & off value be determined by the property "CustomColor" in the DataProvider below: <UserControl x:Class="ActiveSummary" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cfx="http://schemas.softwarefx.com/chartfx/wpf/80" xmlns:cfxControls="clr-namespace:ChartFX.WPF.Controls;assembly=ChartFX.WPF" xmlns:cfxMotifs="http://schemas.softwarefx.com/chartfx/wpf/80/motifs" Height="250" Width="250" xmlns:cfxaddmotifs="http://schemas.softwarefx.com/chartfx/wpf/80/ext/motifs"> <UserControl.Resources> <XmlDataProvider x:Key="dummyData" XPath="Data/DummyData"> <x:XData> <Data xmlns=""> <DummyData LegendContent="On" Value="83" CustomColor="Green" /> <DummyData LegendContent="Off" Value="17" CustomColor="Red" /> </Data> </x:XData> </XmlDataProvider> </UserControl.Resources> <Grid> <cfx:Chart Gallery="Pie" x:Name="_ActiveChart" Margin="2,2,2,2" Style="{x:Static cfxaddmotifs:Floating.Style}" ItemsSource="{Binding Source={StaticResource ResourceKey=dummyData}}" Palette="{x:Static cfx:Palettes.Basic}"> <cfx:Chart.AllSeries> <cfx:AllSeriesAttributes> <!--<cfx:AllSeriesAttributes.Template> <DataTemplate> <Rectangle Width="{Binding Path=Width}" Height="{Binding Path=Height}" Fill="{Binding Path=CustomColor}"/> </DataTemplate> </cfx:AllSeriesAttributes.Template>--> </cfx:AllSeriesAttributes> </cfx:Chart.AllSeries> <cfx:Chart.AxisX> <cfx:Axis> <cfx:Axis.Labels> <cfx:AxisLabelAttributes BindingPath="@LegendContent" /> </cfx:Axis.Labels> </cfx:Axis> </cfx:Chart.AxisX> <cfx:Chart.Series> <cfx:SeriesAttributes BindingPath="@Value" Content="Summary" /> </cfx:Chart.Series> </cfx:Chart> </Grid> </UserControl> I believe this can be done with a DataTemplate, as I have shown in the commented out code above, similar to the post here. My question is: what is the proper DataTemplate to enable me to override the fill property of the Pie Chart so that I can determine the color that should be used for the series in XAML?
  5. The C# method for visibility worked perfectly. I assume I dont have the most recent Service Pack for WPF - When I attempted to use your XAML example it responded with a "method not implemented". How do I get the most recent service pack?
  6. Forgot to ask my other question: I would also like to have these ConditionalAttributes only affect one of the two data series values (BATT_FINISH, not BATT_START). I thought I could do this by using the AffectedSeries property like this: <cfx:ConditionalAttributes Fill="Red" Content="Poor Coupling" AffectedSeries="1"> <cfx:ConditionalAttributes.Condition> <cfx:RangeCondition From="0.0" To="0.5" BindingPath="@COUPLING"/> </cfx:ConditionalAttributes.Condition> </cfx:ConditionalAttributes> Unfortunately if I set this AffectedSeries property the coloring no longer works for any of the series. How can I ensure that I only color one of the two data series?
  7. This looks like it has worked quite well! I added Content properties and now these conditional attributes are showing up in the Legend. However, this raises a follow-up question: how can I remove the the first two series in the legend, so I am only showing the colors ConditionalAttributes? Directions for how to do this appear to be in the ChartFX Resource Center under "LegendItemAttributes class", but I think there is an error in this documentation. The code suggested is: LegendItemAttributes item = new LegendItemAttributes();chart1.LegendBox.ItemAttributes[chart1.Series[0]] = item;item.Visible = false; I am doing the following: 1) I am declaring the Series Attributes in WPF like this: <cfx:Chart.Series> <cfx:SeriesAttributesCollection> <cfx:SeriesAttributes BindingPath="@BATT_FINISH" Content="Battery Finish" /> <cfx:SeriesAttributes BindingPath="@BATT_START" Content="Battery Start" Volume="60" Opacity=".75"/> </cfx:SeriesAttributesCollection> </cfx:Chart.Series> In the C# constructor, I try to access the series: LegendItemAttributes item = new LegendItemAttributes(); _batteryRechargeChart.LegendBox.ItemAttributes[_batteryRechargeChart.Series[0]] = item; HoweverI receive the erorr on _batteryRechargeChart of: Error 2 Argument '1': cannot convert from 'ChartFX.WPF.SeriesAttributes' to 'ChartFX.WPF.Internal.ILegendItemGenerator' Additionally, I believe the 3rd line of your documentation should be corrected to: item.Visibility = System.Windows.Visibility.Hidden;
  8. Hi, I am currently using a bullet chart with multiple instances of the following data structure: <RechargeInfo START_TIME="11/1/2009 6:00:00 PM" FINISH_TIME="11/1/2009 6:45:00 PM" BATT_START=".10" BATT_FINISH=".90" COUPLING="1.77777777777778" /> I am using the chart to compare the BATT_START and BATT_FINISH values in the data structure above. I have successfully used the Conditional Attributes feature to color the fill of the graph based on specific rules in the XAML code with the following code: <cfx:Chart.ConditionalAttributes> <cfx:ConditionalAttributes Fill="Red"> <cfx:ConditionalAttributes.Condition> <cfx:RangeCondition From="0.0" To="0.5" BindingPath="@COUPLING"/> </cfx:ConditionalAttributes.Condition> </cfx:ConditionalAttributes> <cfx:ConditionalAttributes Fill="Yellow"> <cfx:ConditionalAttributes.Condition> <cfx:RangeCondition From="0.5" To="1.25" BindingPath="@COUPLING"/> </cfx:ConditionalAttributes.Condition> </cfx:ConditionalAttributes> <cfx:ConditionalAttributes Fill="Green"> <cfx:ConditionalAttributes.Condition> <cfx:RangeCondition From="1.25" BindingPath="@COUPLING"/> </cfx:ConditionalAttributes.Condition> </cfx:ConditionalAttributes> </cfx:Chart.ConditionalAttributes> I would like to have a legend box which can display the meaning of the coloring of these conditional attributes, but I am not sure how to do this with the current LegendBox. Per another Forum post here I am not sure this is possible using the LegendBox. Can you help me to display a legend to the user for these conditional attributes, and if necessary, suggest a replacement for the conditional attributes?
×
×
  • Create New...