Question

I have got an MS chart that I am showing in an ASP.net page.

The type of the series that I am attaching to the chart is of CandleStick

How can I change the colors of the bars from default blue and white to something else eg Red and Green?

I haven't found any properties so far.

Any help is much appreciated.

Was it helpful?

Solution

Try this:

// setting bar colors
this._chart.Series[0]["PriceUpColor"] = "Green"; 
this._chart.Series[0]["PriceDownColor"] = "Red";

OTHER TIPS

Or this:

chart1.Series["Series1"].CustomProperties = "PriceDownColor=Red, PriceUpColor=Green";
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top