Commit 443aba7a authored by Alexandre Delanoë's avatar Alexandre Delanoë

[DESIGN] Adding Charts and fix some design before implementation.

parent 55e35e2f
...@@ -63,7 +63,7 @@ title mainTitle subTitle = ...@@ -63,7 +63,7 @@ title mainTitle subTitle =
,itemGap: 0.0 ,itemGap: 0.0
,zlevel: 2.0 ,zlevel: 2.0
,z: 2.0 ,z: 2.0
,left: relativePosition (Relative LeftPos) ,left: relativePosition (Relative RightPos)
,top: relativePosition (Relative Top) ,top: relativePosition (Relative Top)
,right: numberPosition 60.0 ,right: numberPosition 60.0
,bottom: percentPosition 40.0 ,bottom: percentPosition 40.0
......
...@@ -176,10 +176,9 @@ tableSpec = simpleSpec performAction render ...@@ -176,10 +176,9 @@ tableSpec = simpleSpec performAction render
defaultContainer :: {title :: String} -> TableContainerProps -> Array ReactElement defaultContainer :: {title :: String} -> TableContainerProps -> Array ReactElement
defaultContainer {title} props = defaultContainer {title} props =
[ div [className "row"] [ div [className "row"]
[ div [className "col-md-1"] [b [] [text title]] [ div [className "col-md-4"] [props.pageSizeDescription]
, div [className "col-md-2"] [props.pageSizeControl] , div [className "col-md-4"] [props.paginationLinks]
, div [className "col-md-3"] [props.pageSizeDescription] , div [className "col-md-4"] [props.pageSizeControl]
, div [className "col-md-3"] [props.paginationLinks]
] ]
, table [ className "table"] , table [ className "table"]
[ thead [className "thead-dark"] [ props.tableHead ] [ thead [className "thead-dark"] [ props.tableHead ]
...@@ -218,8 +217,9 @@ tableElt props = createElement tableClass props [] ...@@ -218,8 +217,9 @@ tableElt props = createElement tableClass props []
sizeDD :: PageSizes -> (Action -> Effect Unit) -> ReactElement sizeDD :: PageSizes -> (Action -> Effect Unit) -> ReactElement
sizeDD ps d sizeDD ps d
= span [] = span []
[ text " " [ select [ className "form-control"
, select [onChange (\e -> d (ChangePageSize $ string2PageSize $ (unsafeCoerce e).target.value))] $ map (optps ps) aryPS , onChange (\e -> d (ChangePageSize $ string2PageSize $ (unsafeCoerce e).target.value))
] $ map (optps ps) aryPS
] ]
textDescription :: Int -> PageSizes -> Int -> ReactElement textDescription :: Int -> PageSizes -> Int -> ReactElement
......
...@@ -51,16 +51,16 @@ filterNTree p (NTree x ary) = ...@@ -51,16 +51,16 @@ filterNTree p (NTree x ary) =
type FTree = NTree LNode type FTree = NTree LNode
data Action = ShowPopOver ID data Action = ShowPopOver ID
| ToggleFolder ID | ToggleFolder ID
| RenameNode String ID | RenameNode String ID
| Submit ID String | Submit ID String
| DeleteNode ID | DeleteNode ID
| Create ID | Create ID
| SetNodeValue String ID | SetNodeValue String ID
| ToggleCreateNode ID | ToggleCreateNode ID
| ShowRenameBox ID | ShowRenameBox ID
| CancelRename ID | CancelRename ID
type State = { state :: FTree } type State = { state :: FTree }
......
module Gargantext.Pages.Corpus.Metrics where module Gargantext.Pages.Corpus.Chart.Metrics where
import Data.Array (foldl) import Data.Array (foldl)
import Data.Tuple (Tuple(..)) import Data.Tuple (Tuple(..))
......
module Gargantext.Pages.Corpus.Pie where module Gargantext.Pages.Corpus.Chart.Pie where
import Data.Array (foldl) import Data.Array (foldl)
import Data.Tuple (Tuple(..)) import Data.Tuple (Tuple(..))
......
module Gargantext.Pages.Corpus.Tree where module Gargantext.Pages.Corpus.Chart.Tree where
import Data.Array (foldl) import Data.Array (foldl)
import Data.Tuple (Tuple(..)) import Data.Tuple (Tuple(..))
......
...@@ -41,7 +41,7 @@ render dispatch _ state _ = [ ...@@ -41,7 +41,7 @@ render dispatch _ state _ = [
, subTitle : "Total scientific publications" , subTitle : "Total scientific publications"
, xAxis : xAxis' ["2015", "2016", "2017"] , xAxis : xAxis' ["2015", "2016", "2017"]
, yAxis : yAxis' { position: "left" , yAxis : yAxis' { position: "left"
, show: true , show: false
} }
, series : myData , series : myData
, addZoom : false , addZoom : false
......
...@@ -12,9 +12,9 @@ import Gargantext.Config (TabType(..), TabSubType(..)) ...@@ -12,9 +12,9 @@ import Gargantext.Config (TabType(..), TabSubType(..))
import Gargantext.Config (CTabNgramType(..), End(..), Path(..), TabSubType(..), TabType(..), toUrl) import Gargantext.Config (CTabNgramType(..), End(..), Path(..), TabSubType(..), TabType(..), toUrl)
import Gargantext.Pages.Corpus.Tabs.Types (Props) import Gargantext.Pages.Corpus.Tabs.Types (Props)
import Gargantext.Pages.Corpus.Metrics (metricsSpec) import Gargantext.Pages.Corpus.Chart.Metrics (metricsSpec)
import Gargantext.Pages.Corpus.Pie (pieSpec) import Gargantext.Pages.Corpus.Chart.Pie (pieSpec)
import Gargantext.Pages.Corpus.Tree (treeSpec) import Gargantext.Pages.Corpus.Chart.Tree (treeSpec)
import Gargantext.Pages.Corpus.Dashboard (globalPublis) import Gargantext.Pages.Corpus.Dashboard (globalPublis)
import Gargantext.Components.NgramsTable as NT import Gargantext.Components.NgramsTable as NT
......
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