1. Rehab Hassan
  2. PowerBuilder
  3. Thursday, 1 February 2018 06:54 AM UTC

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

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 1 February 2018 21:39 PM UTC
  2. PowerBuilder
  3. # 1

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.
  • 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.