User (Legacy) Posted December 9, 2003 Report Share Posted December 9, 2003 I have table with 3 fields: field1 = numeric value field2 = description field3 = hex color -- example (#000000) Chart1.DataType(0) = CDT_VALUE Chart1.DataType(1) = CDT_LABEL Chart1.DataType(2) = CDT_NOTUSED What do I set to have manual colors for each pie slice based on my hex color field in the table. I am not using array. Do I have to. The pie chart works now, but I am using Chart1.Palette = "Light Pastels". Link to comment Share on other sites More sharing options...
Software FX Posted December 10, 2003 Report Share Posted December 10, 2003 Colors and other visual attributes can not be automatically read from the data source. Only data and labels are. You need to set the colors using the API. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted December 10, 2003 Author Report Share Posted December 10, 2003 I tried this: First I tried my manually inputting rgb and it worked. Then I tried using data field from db... FromHexColor function converts hex to rgb and outputs it ... but that didn't work. So, your saying the only way to do this is manually? I can't use what's in the database -- even if I store rgb as a field in the db & read that? ' Color Settings Chart1.OpenDataEx 3,16,0 for i = 0 to 3 Chart1.Color(i) = FromHexColor(rsChart(3)) 'Chart1.Color(0) = RGB(255,255,255) 'Chart1.Color(1) = RGB(255,0,255) 'Chart1.Color(2) = RGB(255,255,0) 'Chart1.Color(3) = RGB(0,255,255) next Chart1.CloseData 3 "SoftwareFX Support" <support@softwarefx.com> wrote in message news:pp8NzJzvDHA.3512@WEBSERVER1... > Colors and other visual attributes can not be automatically read from the > data source. Only data and labels are. > > You need to set the colors using the API. > > -- > FP > Software FX, Inc. > > Link to comment Share on other sites More sharing options...
Software FX Posted December 11, 2003 Report Share Posted December 11, 2003 There is no difference for Chart FX where do you get the color from, as long as it is a color. There should be no difference between RGB(255,255,255) and FromHexColor(rsChart(3)). If this function in fact returns a valid RGB Color, it will work the same way. My guess is that the color you are passing is not a valid color. Check the value returned and compare it against the value return by RGB. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted December 11, 2003 Author Report Share Posted December 11, 2003 Yes I finally got it. Once I seperated r, g, b in 3 different db fields -- then manually wrote rgb(rs(0),rs(1),rs(2))... it worked. Thanks "SoftwareFX Support" <support@softwarefx.com> wrote in message news:$lM5I$BwDHA.3512@WEBSERVER1... > There is no difference for Chart FX where do you get the color from, as long > as it is a color. > > There should be no difference between RGB(255,255,255) and > FromHexColor(rsChart(3)). If this function in fact returns a valid RGB > Color, it will work the same way. > > My guess is that the color you are passing is not a valid color. Check the > value returned and compare it against the value return by RGB. > > -- > FP > Software FX, Inc. > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.