Forum Discussion

joshua1990's avatar
joshua1990
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

Charticulator - Alternative Text Color

Hi experts!

I have a simple bubble chart in charticulator with a text field that shows me the exact value. The bubbles are black and the text is white.

Since there are also values of '0' I see nothing in the visual in the end.

Is it possible to get a black text if Value is '0'?

Is it somehow possible to bring a dax measure with color information into that conext?

  • Hi joshua1990,

    You can't assign colour values directly (e.g., by hex code), as Charticulator binds numeric values as a gradual colour scale. If you want to do this without modelling, you can do user two text marks (one for zero values and one for everything else), e.g.:

    How you should be able to reproduce:

     

    1. For your existing text mark (which we'll use for the non-zero values in this example), drag your measure value to the Visibility attribute, e.g.:



    2. Click on the created scale (i) to bring up the scale editor. Ensure that your measure is selected (ii), and then set the Boolean condition to Greater than 0 (iii), e.g.:

       

    3. Add another text mark, that is the same as your primary label.

    4. Give this a different name.

    5. Set its position to the same as the primary text mark.

    6. Set its Color attribute to black.

    7. This all may look messy for the moment, but we'll sort that next, e.g.:



    8. Hold the Shift key and drag your measure to this mark's Visibility attribute. Holding the Shift key is very important, as this will tell Charticulator to create a new scale for the attribute, and not re-use the existing one. You should see something like the following if this has worked:

      If it hasn't worked, you will see something like this (this is incorrect, as Charticulator will use the same conditions to show/hide the marks):

      If this has happened, remove the Visibility attribute data binding from your 'zero' mark and repeat the step.


    9. Click this new scale to open the scale editor, and set the Boolean properties to Equal to 0, e.g.:



    10. This will now hide the values greater than zero and will (hopefully) look how you expect it to, e.g.:

       

    All being well, this is all you should need to do. Good luck!

     

    Daniel

1 Reply

  • dm-p's avatar
    dm-p
    Icon for Super User rankSuper User

    Hi joshua1990,

    You can't assign colour values directly (e.g., by hex code), as Charticulator binds numeric values as a gradual colour scale. If you want to do this without modelling, you can do user two text marks (one for zero values and one for everything else), e.g.:

    How you should be able to reproduce:

     

    1. For your existing text mark (which we'll use for the non-zero values in this example), drag your measure value to the Visibility attribute, e.g.:



    2. Click on the created scale (i) to bring up the scale editor. Ensure that your measure is selected (ii), and then set the Boolean condition to Greater than 0 (iii), e.g.:

       

    3. Add another text mark, that is the same as your primary label.

    4. Give this a different name.

    5. Set its position to the same as the primary text mark.

    6. Set its Color attribute to black.

    7. This all may look messy for the moment, but we'll sort that next, e.g.:



    8. Hold the Shift key and drag your measure to this mark's Visibility attribute. Holding the Shift key is very important, as this will tell Charticulator to create a new scale for the attribute, and not re-use the existing one. You should see something like the following if this has worked:

      If it hasn't worked, you will see something like this (this is incorrect, as Charticulator will use the same conditions to show/hide the marks):

      If this has happened, remove the Visibility attribute data binding from your 'zero' mark and repeat the step.


    9. Click this new scale to open the scale editor, and set the Boolean properties to Equal to 0, e.g.:



    10. This will now hide the values greater than zero and will (hopefully) look how you expect it to, e.g.:

       

    All being well, this is all you should need to do. Good luck!

     

    Daniel