helix

Ahmed Hassan 2022-05-27T17:23:03.850719Z

https://ej2.syncfusion.com/react/demos/#/bootstrap5/chart/line I'm trying to translate this code into helix, but only grid is showing and lines for data1 and data2 are not showing.

lilactown 2022-05-27T17:27:27.810309Z

cljs vectors (created using [] syntax) and maps (created using {} syntax) are not the same as JS arrays and objects

💯 1
lilactown 2022-05-27T17:28:41.610299Z

so your data1 and data2 are created using CLJS vectors and maps and the chart components probably don't know how to read them

💯 1
lilactown 2022-05-27T17:29:55.144099Z

you can write JS arrays and objects using the #js reader tag, e.g.

(def data1
  #js [#js {:x (js/Date. 2005 0 1) :y 21}
       #js {:x (js/Date. 2006 0 1) :y 24}
       #js {:x (js/Date. 2007 0 1) :y 36}
       #js {:x (js/Date. 2008 0 1) :y 38}
       #js {:x (js/Date. 2009 0 1) :y 54}
       #js {:x (js/Date. 2010 0 1) :y 57}
       #js {:x (js/Date. 2011 0 1) :y 70}])

💯 1
Ahmed Hassan 2022-05-27T17:35:56.148479Z

Thanks, It works. I also had to do similar to the CLJS vector of services:

($ Inject {:services #js [LineSeries, DateTime, Legend, Tooltip]})

🙌 1
🙌🏻 1