Commit f45a7bf8 authored by James Laver's avatar James Laver

Updated G.C.Charts options

parent b7c95d60
...@@ -11,17 +11,16 @@ import Gargantext.Components.Charts.Options.Legend (legendType, LegendMode(..), ...@@ -11,17 +11,16 @@ import Gargantext.Components.Charts.Options.Legend (legendType, LegendMode(..),
import Gargantext.Components.Charts.Options.Position (Align(..), LeftRelativePosition(..), TopRelativePosition(..), numberPosition, percentPosition, relativePosition) import Gargantext.Components.Charts.Options.Position (Align(..), LeftRelativePosition(..), TopRelativePosition(..), numberPosition, percentPosition, relativePosition)
import Gargantext.Components.Charts.Options.Series (Series, seriesPieD1) import Gargantext.Components.Charts.Options.Series (Series, seriesPieD1)
import Gargantext.Components.Charts.Options.Type (DataZoom, Echarts, Legend, Option, Title, XAxis, YAxis, xAxis, yAxis) import Gargantext.Components.Charts.Options.Type (DataZoom, Echarts, Legend, Option, Title, XAxis, YAxis, xAxis, yAxis)
import React (unsafeCreateElementDynamic) import React (ReactClass, unsafeCreateElementDynamic)
import React as R import Reactix as R
import Gargantext.Utils.Reactix as R2
import Unsafe.Coerce (unsafeCoerce) import Unsafe.Coerce (unsafeCoerce)
foreign import eChartsClass :: ReactClass Echarts
foreign import eChartsClass :: R.ReactClass Echarts chart :: Options -> R.Element
chart :: Options -> R.ReactElement
chart = echarts <<< chartWith <<< opts chart = echarts <<< chartWith <<< opts
chartWith :: Option -> Echarts chartWith :: Option -> Echarts
chartWith option = chartWith option =
{ option { option
...@@ -39,8 +38,8 @@ chartWith option = ...@@ -39,8 +38,8 @@ chartWith option =
--, onEvents : Nothing --, onEvents : Nothing
} }
echarts :: Echarts -> R.ReactElement echarts :: Echarts -> R.Element
echarts c = unsafeCreateElementDynamic (unsafeCoerce eChartsClass) c [] echarts c = R2.buff $ unsafeCreateElementDynamic (unsafeCoerce eChartsClass) c []
type MainTitle = String type MainTitle = String
type SubTitle = String type SubTitle = String
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment