Holiday Notice – Support Unavailable on April 18 and April 21

We just wanted to let you know that our support team will be offline on Friday, April 18th (Good Friday) and Monday, April 21st (Easter Monday) due to the holidays.
We'll be back on Tuesday, ready to assist you!

In the meantime, if you need any help, feel free to:

Amelia YouTube Channel

wpDataTables YouTube Channel

Thank you for your understanding, and we wish you a wonderful holiday weekend!

Okay
  Public Ticket #3928422
Converting text strings to numeric values
Open

Comments

  • Dan started the conversation

    I am trying out the free version of wpDataTables and it looks promising. But I have many tables from surveys with columns that are text strings. I need to be able to create charts that show the total of the different text string values. For example, bar charts that show the number of "Strongly Agree", "Somewhat Agree" and "Neutral". I see that string values can only be used as labels, and that the string values need to be converted to numeric values in order to chart them. Per your chatbot (not very helpful) I have tried converting the column type to both an integer and a float column, but all that did was change all the text strings to zeros. Is there a way to convert different text strings to different values with the plugin? For example, "strongly agree" = 1, "somewhat agree" = 2, etc. Or do I have to do that in the source data before importing? 

  •  1,894
    Miloš replied

    Hi Dan,

    First off, I apologize for the initial replies from our chatbot—he’s still learning, and we’re training him to better handle various use cases. 😊

    You're absolutely right—that wasn't helpful for the scenario you're working on.

     

    Here’s a quick workaround you can use when you want to create a chart which will show how many times each string value/choice appears in your data, such as from a survey or other user input:

    Add a Formula column to your source table and set the formula to simply '1'.
    This will act as a "Count" field.

    When creating a chart:

    Select the string column as the first field (for X-axis labels).

    Select the "Count" column as the second field (for the numeric series).

    Enable the "Chart Grouping" feature.
    This will group identical labels and sum their count, displaying them as a single data point.

    If you'd like a more detailed step-by-step example, feel free to check out our full article here:
    👉 [https://help.wpdatatables.com/en/articles/17-counting-string-values-for-charts]

    Let me know if that helps or if you have any other questions!

    Kind regards,
    Milos

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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