Jump to content


Controling Chart Plot Color

colors pallete

  • Please log in to reply
3 replies to this topic

#1 Salman

Salman

    Forum Newbie

  • Members
  • 6 posts
  • LocationBahrain

Posted 17 February 2017 - 03:42 PM

I'm using V3 for FileMaker and trying to control the color of five chart plots.
I've five chart plots which I control if they show or not by five checkboxs one for each chart plot like this:-
 
If ( Charts::g_DB_A = 1 ; "&data=[seriesName=A]"  & Substitute($$AvRead1;"¶";";"); "" )
If ( Charts::g_DB_B = 1 ; "&data=[seriesName=B]"  & Substitute($$AvRead1;"¶";";"); "" )
etc... all the way to g_DB_E
 
The field g_DB_A is a checkbox. If it is selected to = 1 then a chart is plotted with these values, (name is "A" and value is extracted from $$Avread1) and if the checkbox is de-selected then everything is nulled and no chart will be plotted for "A". the same goes for all the series A, B, C, D, and E.
 
The colors of all five charts are consistent when all chechboxs are selected, however, once I de-select any one of the the checkboxes then the colors get swopped between the charts because now one chart plot is nulled therefore missing. I assume that is because of the pallete auto coloring.
 
Example:
(A is RED, B is GREEN, C is BLUE, D is PURPLE, and E is YELLOW).
if I de-select checkbox for A then:
(B becomes RED, C is GREEN, D is BLUE , E is PURPLE).
 
My question is how can I control the colors so that each chart keeps its original color no matter what is selected or de-selected.
 
I hope this makes sense.

Salman

#2 Salman

Salman

    Forum Newbie

  • Members
  • 6 posts
  • LocationBahrain

Posted 18 February 2017 - 11:54 AM

Maybe I can simplify my question without going through the details of my project.
 
Simply put, how do I allocate a colour for every chart plot even if the number of charts change.
 
i.e. Say we have two column charts for Data "A" and Data "B". 
I want Data "A" column to always be RED, and Data "B" column to always be GREEN, even if column "A" disappears.
Because at the moment if column "A" disappears then column "B" turns into RED instead of its original GREEN.
 
I hope this is easier.

Salman

#3 Prerana

Prerana

    Forum Guru

  • Members
  • PipPipPipPipPipPip
  • 106 posts

Posted 22 February 2017 - 02:03 AM

Hello,
 
Thanks for the query.
 
As we can see, you are using checkbox for selecting and deselecting the column, so at the time of fetching the color some how its fetchng the color of the deselected column, so check your code once.
 
You can also send the scaledown to us so that we can check the same at our end.
 
P.S. FusionCharts had stopped any development for filemaker since 7th aug 2013.
 
Hope this will help,

Thanks,

Prerana Singh


#4 Salman

Salman

    Forum Newbie

  • Members
  • 6 posts
  • LocationBahrain

Posted 22 February 2017 - 02:59 PM

 

Hello,
 
Thanks for the query.
 
As we can see, you are using checkbox for selecting and deselecting the column, so at the time of fetching the color some how its fetchng the color of the deselected column, so check your code once.
 
You can also send the scaledown to us so that we can check the same at our end.
 
P.S. FusionCharts had stopped any development for filemaker since 7th aug 2013.
 
Hope this will help,

 

Thanks for your time to reply, Below is the code I use:

 

"&data=[seriesName=Charts For:] " & 
 
If ( Charts::g_DB_B = 1 ; "&data=[seriesName=B-Fast]  " & Data_Value_B  ; "" ) & 
If ( Charts::g_DB_L = 1 ; "&data=[seriesName=Lunch]   " & Data_Value_L  ; "" ) & 
If ( Charts::g_DB_D = 1 ; "&data=[seriesName=Dinner]  " & Data_Value_D  ; "" ) & 
If ( Charts::g_DB_N = 1 ; "&data=[seriesName=Night]   " & Data_Value_N  ; "" ) & 
If ( Charts::g_DB_A = 1 ; "&data=[seriesName=Average] " & Data_Value_A  ; "" )

Salman





Also tagged with one or more of these keywords: colors, pallete