1. Rehab Hassan
  2. PowerBuilder
  3. Thursday, 01 February 2018

how can i change the colors of datawindow graph (pie chart) which does not contain series

Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

Hi Rehab;

  You should always have at least one series in any pie graph. Here is the code I use in my framework on the GraphCreate event of the DW Control, as follows ...

ii_rc    =        THIS.SetDataStyle ( 'gr_data', 1,1,  ForeGround!,  fn_get_colour_no ( "Slate Blue" ) )
ii_rc    +=    THIS.SetDataStyle ( 'gr_data', 1,2 , ForeGround!,  fn_get_colour_no ( "BurlyWood" ) )
ii_rc    +=    THIS.SetDataStyle ( 'gr_data', 1,3 , ForeGround!,  fn_get_colour_no ( "Coral" ) )
ii_rc    +=    THIS.SetDataStyle ( 'gr_data', 1,4 , ForeGround!,  fn_get_colour_no ( "Orange" ) )
ii_rc    +=    THIS.SetDataStyle ( 'gr_data', 1,5 , ForeGround!,  fn_get_colour_no ( "Sea Green" ) )

This results in ...

                            Note: Above example is in PB 2017's new DOCKABLE Window style.

 

Mapped by ...

 

HTH

Regards .. .Chris

Comment
There are no comments made yet.
  1. Thursday, 1 February 2018
  2. PowerBuilder
  3. # 1
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies. Learn More