Change colors dynamically in columns

Not Answered This post has 0 verified answers | 5 Replies | 2 Followers Thread's RSS feed.

David
Points 60
Replied On: Fri, Dec 12 2014 8:36 AM Reply

Hi,

I would like to know if I can to make a dynamically binding behind code for to apply the color of columns in xamdatachart from a property in datasource with the color that it must show.

Thank you.

  • Post Points: 35

All Replies

Stefan
Points 138,023
Infragistics Employee
Replied On: Wed, Dec 17 2014 4:09 AM Reply

Hello David,

 

Thank you for your post. I have been looking into it and I can suggest you see this forum thread:

 

http://www.infragistics.com/community/forums/t/51914.aspx

 

where a similar question is already discussed. Please let me know if this helps you or you have further questions on this matter.

 

Looking forward for your reply.

Sincerely,
Stefan, MCPD
Software Developer
Infragistics, Inc.
www.infragistics.com/support

  • Post Points: 5
Stefan
Points 138,023
Infragistics Employee
Replied On: Mon, Dec 22 2014 9:29 AM Reply

Hello David,

 

I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.

Sincerely,
Stefan, MCPD
Software Developer
Infragistics, Inc.
www.infragistics.com/support

  • Post Points: 20
David
Points 60
Replied On: Fri, Jan 2 2015 8:19 AM Reply

Hello Stefan,

Thank you, but with this example we don't make working properly with infragistics 14.x version, this example works fine with 12.x versions.

We trying to make a binding with BrushProperty in Columnseries object, but it doesn't work, I attach a little example:

Simple Class with values

public class SimpleData

{

public Brush Color{ get; set; }

public Double Value { get; set; }

}

Making ColumnSerie

private ColumnSeries BuildColumnSerie(CategoryXAxis axisX, NumericYAxis axisY, ObservableCollection<SimpleData> dataSource)

{

ColumnSeries serie = new ColumnSeries();

serie.XAxis = axisX;

serie.YAxis = axisY;

serie.MarkerType = MarkerType.Circle;

serie.ItemsSource = dataSource;

serie.ValueMemberPath = "Value";

serie.SetBinding(ColumnSeries.BrushProperty, new Binding("Color"));

...

}

In the ObservableCollection<SimpleData>dataSource for each value we have a different color and value configurated in their properties, the binding with the values works correctly but the binding with the Color property it doesn't work, I assume that the used path for color binding is incorrect,

I appreciate if you can help me.


  • Post Points: 20
Stefan
Points 138,023
Infragistics Employee
Replied On: Mon, Jan 5 2015 3:14 AM Reply

Hello David

I can say that the ColumnSeries' Brush property will apply color to all columns, so you cannot use it to achieve your goal. The things yo ucan do are either use our older version where Graham approach works or suggest a new product tide for adding "Color/Brush Path" Property to the Series. You can suggest new product ideas for future versions (or vote for existing ones) at http://ideas.infragistics.com.

There are many benefits to submitting an product idea:

-          Direct communication with our product management team regarding your product idea.

-          Notifications whenever new information regarding your idea becomes available.

-          Ability to vote on your favorite product ideas to let us know which ones are the most important to you.  You will have ten votes for this and can change which ideas you are voting for at any time.

-          Allow you to shape the future of our products by requesting new controls and products altogether.

-          You and other developers can discuss existing product ideas with members of our Product Management team.

Steps to create your idea:               

1.       Log into the Infragistics Product Idea site at http://ideas.infragistics.com (creating a new login if needed).

2.       Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)

3.       Add your product idea and be sure to be specific and provide as much detail as possible. Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!

4.   “Include a link to this thread” in your idea so product management will be able to look back at this case. 

The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.

Sincerely,
Stefan, MCPD
Software Developer
Infragistics, Inc.
www.infragistics.com/support

  • Post Points: 20
David
Points 60
Replied On: Mon, Jan 5 2015 5:28 AM Reply

Hello Stefan, Ok I'm going to add a idea because I think that it's a basic function that you can have control over colours for any represented value in a chart.

Thank you, best regards.

  • Post Points: 5
Page 1 of 1 (6 items) | RSS