Okay
  Public Ticket #2765001
HighCharts xAxis styling problem
Closed

Comments

  • Roee Angel started the conversation

    Hi there,

    I have a question with regard to styling highcharts.js.
    The problem is simple, whenever I make any changes to xAxis elements all existing values go to default (means my labels just become integers)  

    For example.  If I add this bit of code:

    obj.options.xAxis = {
        labels: {
            style: {
                color: 'red',
                fontSize: '15px'
            }
        }
    } 

    The color and size of the labels change correctly but my labels just become integers. I attached a picture before and After added the code.

    What is the mistake?

    Thank you.

  • [deleted] replied

    Hi Roee

    Thank you for reaching out to us.

    Sorry for the late response, we're Christian Orthodox, so we had non-working days for Easter.

    Since you are using a custom solution for your chart please check our documentation about wpDataCharts callbacks

    • Every chart exposes several options that customize its look and feel. Charts usually support custom options appropriate to that visualization. wpDataChart callbacks allow adding options that are available in Google Charts APIHighcharts API, and Chart.js API
    • All necessary resources are available in charts engines API (depends on which one you use). Every engine has a different approach to chart settings. In wpDataChart callbacks, you have to adopt those settings to the wpDataChart object (you can take a look at examples for each engine in our documentation, and also in the Support help center). A huge number of examples for any area of programming can be found on stackoverflow.com (typing your problem in google and at the end add "site: stackoverflow.com" and Google will search only that website). Also, a lot of examples of charts, chart settings, and customization can be found on jsffidle.net (typing in google for example "line chart highcharts jsffidle")
    • Please note that using hooks or wpDataTable and wpDataChart callbacks requires a certain level of programming skills and is not included in the provided support.

  • Kevin Noll replied

    Roee Angel, did you find a solution to this problem? I am having the same issue.