himynameisdave / svelte-frappe-charts

📈 Svelte bindings for frappe-charts.
https://frappe.io/charts
MIT License
306 stars 16 forks source link

How to set options? #21

Closed rodrigosobrero closed 3 years ago

rodrigosobrero commented 3 years ago

How to set options like lineOptions?

lineOptions: {
    regionFill: 1
},
aslak01 commented 3 years ago

+1

himynameisdave commented 3 years ago

Thanks for your question. lineOptions is supported and can be passed directly to the component:

<script>
  import Chart from 'svelte-frappe-charts';

  const data = {
    /* data goes here */
  };

  const lineOptions = {
    regionFill: 1
  };
</script>

<Chart data={data} lineOptions={lineOptions} />