• Resolved kiaraaliano

    (@kiaraaliano)


    I am wondering how I can add a $ symbol to the start of the yAxis labels?

    I’ve found this snippet online:

    yAxis: {
      labels: {
        format: '${value}'
      }
    }

    But am not sure where this gets placed or how to convert it into the correct format to enter in a theme?

    I am using the Highcharts plugin

    Any help would be so appreciated@

    • This topic was modified 5 years, 1 month ago by kiaraaliano.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author methnen

    (@methnen)

    Hey @kiaraaliano have you tried simply putting the dollar signs into the data?

    There’s some built in prefix/suffix handling that will automatically filter out things like dollar signs and then reinsert them on the tooltip end so they don’t mess up the data but are still visible to the user.

    If that’s not sufficient then you could implement this as a theme with something like this:

    <?php
    
    /**
     * Theme Name: Dollar Sign Y Axis
     */
    
    return array(
    	'yAxis' => array(
    		'labels' => array(
    			'format' => '${value}',
    		),
    	),
    );

    Generally speaking you just convert the Javascript style object to a PHP Array and it’ll work (with some rare exceptions).

    • This reply was modified 5 years, 1 month ago by methnen.
    • This reply was modified 5 years, 1 month ago by methnen.
    Plugin Author methnen

    (@methnen)

    Closing since there’s been no response from the OP.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘yAxis Currency Symbol’ is closed to new replies.