Forum Discussion
Charticulator - Alternative Text Color
- 4 years ago
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:
- 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.:
- 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.:
- Add another text mark, that is the same as your primary label.
- Give this a different name.
- Set its position to the same as the primary text mark.
- Set its Color attribute to black.
- This all may look messy for the moment, but we'll sort that next, e.g.:
- 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.
- Click this new scale to open the scale editor, and set the Boolean properties to Equal to 0, e.g.:
- 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
- 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.:
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:
- 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.:
- 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.:
- Add another text mark, that is the same as your primary label.
- Give this a different name.
- Set its position to the same as the primary text mark.
- Set its Color attribute to black.
- This all may look messy for the moment, but we'll sort that next, e.g.:
- 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.
- Click this new scale to open the scale editor, and set the Boolean properties to Equal to 0, e.g.:
- 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