Changing date format in a Guided Chart

Hi there,

Can anyone tell me if I can change the date format in the Guided Chart plugin? I’ve added the Date Plugin and that works great elsewhere in weweb. My array of data has dates formatted like 2023-01-01 and I’m wanting Jan 23.

Thanks!

Hi @Mawk1 :wave:

You would need the date to be formatted in the array you bound to the chart element.

You have a couple of options to do this:

  1. manipulate the data so that the data source returns the date in your preferred format, or
  2. manipulate the data in WeWeb, for example with a workflow on page load that loops through an array of items (e.g. a collection) and updates a variable with the data in your preferred format

Does that make sense?

Yup, I think that makes sense!

1 Like

Cool! If you go with option 2, this article on how to use the for loop in a WeWeb workflow might help.

If you get stuck, don’t hesitate to reach out again :slight_smile: