Jump to content
Software FX Community

Series color when using itemsSource


KRO
 Share

Recommended Posts

Hello

I have recently installed the hotfix with version 8.0.4125.19001.

I use the motifs: <Setter Property="Template" Value="{x:Static cfxMotifs:Simple.ChartTemplate}"/>

And: chart.Palette = Palettes.Primary;

After the hotfix some initiliazed values has changed. I have a chart where set the itemsSource to an ObservableCollection<MyDataObject>().

MyDataObject : ObservableCollection<IDateValue>

{

...

...

} 

public interface IDateValue

{

  DateTime Date { get; set; }

  double Value { get; set; }

}

Before the hotfix my series had different colors without doing any coloring. After the hotfix the color of all the series changed to Red.

If I add an empty SeriesAttributes, the original behavior re-appears.

SeriesAttributes lines = new SeriesAttributes();

chart.Series.Add(lines);

Has some initalized values changed?

How do i set the color for each bound series? 

 

Regards,

KRO

 

 

 

 

Link to comment
Share on other sites

Hi,

We are using a listtransform.

And we got some more logic behind, as we are binding the Chart to a grid, so that the Chart will update when the grid does.

 MyDataObject : ObservableCollection<IDateValue>

{

...

public new IEnumerable<IDateValue> Items {get; set;}

public string Name {get; set;}

...

} 

<WPF:Chart Margin="10" Name="chart" Gallery="Step" ItemsSource="{Binding Path=ItemsSource, ElementName=controlRoot}" UseEffects="False" UseVisuals="True">

<WPF:Chart.DataTransforms>

<Data:ListTransform ColumnPath="Items" ValuePath="Value" SeriesPath="Name"></Data:ListTransform>

</WPF:Chart.DataTransforms>

<WPF:Chart.AxisX>

<WPF:Axis>

<WPF:Axis.Labels>

<WPF:AxisLabelAttributes BindingPath="Date" />

</WPF:Axis.Labels>

</WPF:Axis>

</WPF:Chart.AxisX>

</WPF:Chart>

 I will try to create a sample app which illustrates the issue.

/KRO

Link to comment
Share on other sites

  • 3 weeks later...

Hi

Sry for the late reply. I have been having a hard time trying to create a sample app.
The problem is that we are using the ChartFx.XBAP dll's. And i haven't found a demo license i could use to a demo project.

We use a special license string created with our strong named assemblies.

Refer to post: http://community.softwarefx.com/forums/p/10252/26044.aspx#26044

Any ideas of how to create a sample app? 

Regards,

KRO

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Hi

I haven't been able to reproduce the issue in my test app.If  I eventually succeed in reproduceing it ( in a simple test app) I will post it.But for the moment I will leave it. As i found the workaround  by adding an empty SeriesAttributes, before my itemsSource binding.

SeriesAttributes lines = new SeriesAttributes();chart.Series.Add(lines);

Regards,

KRO

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...