Skip to content

Icons for category y-labels #10030

Answered by pmbert
pmbert asked this question in Q&A
Discussion options

You must be logged in to vote

Maybe there is someone who is interested in this topic after all. So here is the optimized solution for my particular problem:

In scale configuration:

            //hide text label, if icon defined or icon = blank
            //ensure that there's enough space for the icons
           .bounds: 'ticks',
           .ticks: 
                {color :   'black',
                 font:     {family: 'Monospace'}, //necessary to compute space 
                 callback: function(val, index, ticks) {
                               var text = y3Labels[index];
                               if(y3Icons[index]) {text = ' ';}
                               return text.padStart(Math.ceil(y3IconsWidth), …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pmbert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants