himynameisdave / svelte-frappe-charts

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

How to set options? #21

Closed rodrigosobrero closed 4 years ago

rodrigosobrero commented 4 years ago

How to set options like lineOptions?

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

+1

himynameisdave commented 4 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} />