2

Happy Holiday

I wish to add a Custom Color with Transparency to a Custom Property in MS Chart Control on the Candle Stick Chart. I'm getting stuck with the color in quotes. Nothing has worked for me, anyone run into this?

Here's what I have, I'd like to create a color that has a transparency, but since its between quotes nothing for me has worked besides system colors like "Red", "Green"... any help appreciated, Thanks in advance

chtCandleStick.Series[0].Points[ttPoint]["PriceDownColor"] = "Maroon";
Greg
  • 85
  • 6

2 Answers2

1

Found the answer after trial and error. Need to convert the ARGB to Hex, works great

defaultGreen = "#" + 50.ToString("X2") + 0.ToString("X2") + 200.ToString("X2") + 0.ToString("X2");

chtCandleStick.Series[0].Points[ttPoint]["PriceUpColor"] = defaultGreen;

Thanks to: Convert System.Drawing.Color to RGB and Hex Value

Community
  • 1
  • 1
Greg
  • 85
  • 6
0
Chart1.Series[0].Points[ttPoint]["PriceUpColor"] = "Green"; 
Chart1.Series[0].Points[ttPoint]["PriceDownColor"] = "White"; 
Chart1.Series[0].Points[ttPoint].Color = Color.DarkSlateGray; 
Chart1.Series[0].Points[ttPoint].BorderColor = Color.Transparent; 

Hope that this could help you. I was referring to here

Mark
  • 2,041
  • 2
  • 18
  • 35
  • Thanks, but, the Border Color is the color the Border's the Candle Stick. I'm looking to change the color inside the border. – Greg Dec 24 '15 at 03:56