Hi all,
I'm having some problem with the infragistics "candle chart" in my application.
The color of the "body" was supposed to be "red" and the color the" wick" is supposed to be "black
But it happens in the reverse case.(i.e.) The color of the wick is red in color and body is black.
There was a property to set the color of the Wick but i didnt find anything to set the color of the body.
This is creating a big issue in my application.
Am new to this control so can anyone please advice.
Thank you so much for your help in advance.
If it's happening in that specific implemented application, is it possible to create an isolated sample as close as possible to the implemented application that would reproduce the issue? This way I may be able to test it here and see what causes it.
Let me know if that can be arranged.
Sam,sorry for the inconvenience, actually we are getting the data from back end,so never mind of "open value" and "close value",whatever it is,it should be in "Red" color.
Further,your code is working perfectly and we tried it a week ago in sample application like yours,it was too working perfectly,the problem is when i implement it in our application its not working. is there any other go to do this?
Thanks in advance Sam,
By meeting the criteria I was refering to the data that would depend on "Open" value being higher than the "Close" value, in which NagativeRangeColor will be used to fill the body, and vice versa, it the 'Open' value is lower than the 'Close' value the PositiveRangeColor would be used to fill the body.
Can you submit an isolated sample for me to test it here?
Please make sure that the sample needs to be independent from external references so I can build and examine further.
Hi Sam,
Well if i use this in a sample application it works fine. But if i do this in the actual application it is not working. Well, on your reply you have mentioned the data shud meet the criteria. What criteria should it meet. Can you elobrate please.
Thank you so much
You are setting it correctly, but your data has to meet the criteria. Here is the code:
ultraChart1.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.CandleChart;
ultraChart1.CandleChart.PositiveRangeColor = Color.Green; ultraChart1.CandleChart.NegativeRangeColor = Color.Red;
DataTable mydata = new DataTable(); mydata.Columns.Add("StockDate", typeof(DateTime)); mydata.Columns.Add("StockOpen", typeof(int)); mydata.Columns.Add("StockHigh", typeof(int)); mydata.Columns.Add("StockLow", typeof(int)); mydata.Columns.Add("StockClose", typeof(int)); mydata.Columns.Add("SStockVolume", typeof(int));
mydata.Rows.Add(new object[] { DateTime.Parse("2006-01-01"), 81, 83, 81, 82, 117.1 }); mydata.Rows.Add(new object[] { DateTime.Parse("2006-01-02"), 83, 87, 77, 78, 118.1 }); mydata.Rows.Add(new object[] { DateTime.Parse("2006-01-15"), 85, 90, 85, 84, 119.1 }); mydata.Rows.Add(new object[] { DateTime.Parse("2006-01-22"), 87, 89, 86, 88, 127.1 });
this.ultraChart1.DataSource = mydata; this.ultraChart1.DataBind();