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.
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.
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.
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.
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.