Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-gargantext
Commits
d797f867
Commit
d797f867
authored
Jul 20, 2021
by
arturo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Docs] Node Docs : blank page
* Issue
#312
parent
3293f38a
Pipeline
#1628
failed with stage
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
8 deletions
+36
-8
ECharts.purs
src/Gargantext/Components/Charts/Options/ECharts.purs
+5
-1
Type.purs
src/Gargantext/Components/Charts/Options/Type.purs
+16
-0
Histo.purs
src/Gargantext/Components/Nodes/Corpus/Chart/Histo.purs
+1
-1
Texts.purs
src/Gargantext/Components/Nodes/Texts.purs
+14
-6
No files found.
src/Gargantext/Components/Charts/Options/ECharts.purs
View file @
d797f867
...
@@ -59,7 +59,11 @@ chartWith options =
...
@@ -59,7 +59,11 @@ chartWith options =
execOnInit fn = toMaybe >>> case _ of
execOnInit fn = toMaybe >>> case _ of
Nothing -> pure unit
Nothing -> pure unit
Just (ref :: Record EChartRef) -> pure unit -- fn =<< ref.getEchartsInstance
-- Just (ref :: Record EChartRef) -> fn =<< ref.getEchartsInstance
-- ^ this line can break for some reasons... (see Issue #312)
Just (ref :: Record EChartRef) -> do
i <- ref.getEchartsInstance
fn i
echarts :: Echarts -> R.Element
echarts :: Echarts -> R.Element
echarts c = R2.buff $ unsafeCreateElementDynamic (unsafeCoerce eChartsClass) c []
echarts c = R2.buff $ unsafeCreateElementDynamic (unsafeCoerce eChartsClass) c []
...
...
src/Gargantext/Components/Charts/Options/Type.purs
View file @
d797f867
...
@@ -216,3 +216,19 @@ type EChartRef =
...
@@ -216,3 +216,19 @@ type EChartRef =
( getEchartsInstance :: Effect EChartsInstance
( getEchartsInstance :: Effect EChartsInstance
-- ...
-- ...
)
)
----
-- | As "dispatchAction" call has a variadic arity, we can dissociate a type
-- | where the cliked item (bar, pie section, etc.) need this dispatchAction
-- | To do so, we have to trimmed its given properties to match this example [1]
-- |
-- | [1] https://echarts.apache.org/en/api.html#action.highlight
type EChartActionData =
( dataIndex :: Int
, name :: String
, seriesId :: Nullable String
, seriesIndex :: Int
, seriesName :: String
, type :: String
)
src/Gargantext/Components/Nodes/Corpus/Chart/Histo.purs
View file @
d797f867
...
@@ -67,7 +67,7 @@ chartOptions { onClick, onInit } (HistoMetrics { dates: dates', count: count'})
...
@@ -67,7 +67,7 @@ chartOptions { onClick, onInit } (HistoMetrics { dates: dates', count: count'})
, emphasis: { itemStyle: itemStyle { color: blue } }
, emphasis: { itemStyle: itemStyle { color: blue } }
-- @XXX "select" action not working
-- @XXX "select" action not working
-- , selectedMode: selectedMode Single
-- , selectedMode: selectedMode Single
, select: { itemStyle: itemStyle { color: green }}
--
, select: { itemStyle: itemStyle { color: green }}
}
}
series =
series =
...
...
src/Gargantext/Components/Nodes/Texts.purs
View file @
d797f867
module Gargantext.Components.Nodes.Texts where
module Gargantext.Components.Nodes.Texts where
import DOM.Simple.Console (log2)
import Gargantext.Prelude
import Data.Generic.Rep (class Generic)
import Data.Generic.Rep (class Generic)
import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..))
import Data.Show.Generic (genericShow)
import Data.Show.Generic (genericShow)
import Data.Symbol (SProxy(..))
import Data.Tuple.Nested ((/\))
import Data.Tuple.Nested ((/\))
import Effect.Aff (launchAff_)
import Effect.Aff (launchAff_)
import Gargantext.Components.Charts.Options.ECharts (dispatchAction)
import Gargantext.Components.Charts.Options.ECharts (dispatchAction)
import Gargantext.Components.Charts.Options.Type (EChartsInstance)
import Gargantext.Components.Charts.Options.Type (EChartsInstance
, EChartActionData
)
import Gargantext.Components.DocsTable as DT
import Gargantext.Components.DocsTable as DT
import Gargantext.Components.DocsTable.Types (Year)
import Gargantext.Components.DocsTable.Types (Year)
import Gargantext.Components.NgramsTable.Loader (clearCache)
import Gargantext.Components.NgramsTable.Loader (clearCache)
...
@@ -23,13 +23,11 @@ import Gargantext.Components.Tab as Tab
...
@@ -23,13 +23,11 @@ import Gargantext.Components.Tab as Tab
import Gargantext.Components.Table as Table
import Gargantext.Components.Table as Table
import Gargantext.Ends (Frontends)
import Gargantext.Ends (Frontends)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Prelude
import Gargantext.Sessions (WithSession, Session, getCacheState)
import Gargantext.Sessions (WithSession, Session, getCacheState)
import Gargantext.Types (CTabNgramType(..), ListId, NodeID, SidePanelState(..), TabSubType(..), TabType(..))
import Gargantext.Types (CTabNgramType(..), ListId, NodeID, SidePanelState(..), TabSubType(..), TabType(..))
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix as R
import Reactix.DOM.HTML as H
import Reactix.DOM.HTML as H
import Record (set)
import Toestand as T
import Toestand as T
here :: R2.Here
here :: R2.Here
...
@@ -170,8 +168,18 @@ tabsCpt = here.component "tabs" cpt
...
@@ -170,8 +168,18 @@ tabsCpt = here.component "tabs" cpt
-- @XXX due to lack of support for "echart.select" action,
-- @XXX due to lack of support for "echart.select" action,
-- have to manually rely on a set/unset selection
-- have to manually rely on a set/unset selection
-- targeting the "echart.emphasis" action
-- targeting the "echart.emphasis" action
let
opts' :: Record EChartActionData
opts' =
{ dataIndex : opts.dataIndex
, name : opts.name
, seriesId : opts.seriesId
, seriesIndex : opts.seriesIndex
, seriesName : opts.seriesName
, type : "highlight"
}
dispatchAction i { type: "downplay" }
dispatchAction i { type: "downplay" }
dispatchAction i
$ set (SProxy :: SProxy "type") "highlight" opts
dispatchAction i
opts'
activeTab <- T.useBox 0
activeTab <- T.useBox 0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment