Okay
  Public Ticket #3641748
Creating a chart with user column selection
Closed

Comments

  • PhilW started the conversation

    Hi, I am trying to generate a bar chart that the website user can select the data column to generate the chat. I have dozens of columns and don't want the user to have to "deselect" columns from the legend until there is only one column remaining. Is there a way to have a pull-down list or similar to choose a single column to chart?

    Phil

  •  1,767
    Miloš replied

    Hi Phil,

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    I am sorry to disappoint you, but we don't have anything like this available as an 'out of the box' feature.

    The columns which are set on the WP-Admin back end in the chart Wizard, they will be the series which are loaded on the front end of the chart.

    In other words, wpDataTables as well as our wpDataCharts is using a WYSIWYG (What You See Is What You Get) concept.

     This means that the tables and charts are designed to look the same both in the back-end and in the front-end. 


    So, if you choose, for example, some three numeric columns as the chart series on back-end and that is what the chart looks in the Chart Wizard 'preview', it will be the same on front end;

    We don't have a way to allow a front end user to select/deselect the columns shown other than, as you said, clicking into the legend to show/hide the series they wish by using the built-in Chart Engine's interface.


    There could be possibly some custom workarounds, though, if you wish to try adding a custom chart callback.


    Every chart engine has its own layout and its settings.

    We use free libraries for chart engines, and they are limited as to what we can change from within the plugin's UI.

    You can check out all the available chart engines and examples of wpDataCharts documentation here . 

    If the options you need are not in the chart creation wizard,  you can try to find a custom solution using chart callbacks.

    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.


    I hope that helps.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables