Chartjs-How to display dynamic PHP ID in chartjs

0👍

You can dynamically set the JS id like so:

<script>
  <?php foreach($data as $value) : ?>
    const fulltime_<?php echo $data->sid; ?> = ...;
  <?php endforeach; ?>
</script>

Leave a comment