Okay
  Public Ticket #2897266
css global colors
Closed

Comments

  • Rik Viergever started the conversation

    hi, 

    we would like to enter global CSS colors in WPDataTables for the colors of the line graphs, as described here: 

    https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties

    So eg instead of entering #68B42E for the color, we would like to enter var(--color1). This would make it much easier for us to switch colors in the future (we are currently going through a redesign phase). 

    Is this possible? If yes, we would appreciate to learn how. If not, please consider this a feature request. 

  • [deleted] replied

    Hi Rik

    Thank you for reaching out to us.

    Unfortunately this cannot be achieved using the plugin's builtin features, but if you need some custom solution you can 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 included support refers only to advice.

  • Rik Viergever replied

    hi, OK thanks. Could you please consider this a feature suggestion, to be able to use Global Colors using var(--color1) in the regular color settings for the graphs? 

    thanks,

    Rik

  • [deleted] replied

    Hi Rik

    Of coursesmile.png I forwarded this to our developers but feel free to leave your suggestions on this link so it would go straight to them

    Feature suggestion - wpDataTables - Tables and Charts WordPress Plugin

    Features are pushed up on our "to-do" list when there are a lot of customers requesting those features, so having your vote as a customer can be beneficial to this feature being developed sooner.