Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ gulp.task('compile', function(cb) {
var psc = purescript.psc({
// Compiler options
src: [paths.purescripts, paths.bowerSrc],
ffi: paths.ffi,

output: "output",
module: "Graphics.D3.Examples"
});
Expand Down
4 changes: 2 additions & 2 deletions src/BarChart1.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Graphics.D3.Examples.BarChart1 where

import Prelude(id,(++),show,return,unit,Unit(),(>>=),bind)
import Prelude(id,(<>),show,unit,Unit(),(>>=),bind)
import Graphics.D3.Base
import Graphics.D3.Util
import Graphics.D3.Selection
Expand Down Expand Up @@ -41,5 +41,5 @@ main = do
.. selectAll "div"
.. bindData array
.. enter .. append "div"
.. style' "width" (\d -> show (x d) ++ "px")
.. style' "width" (\d -> show (x d) <> "px")
.. text' show
4 changes: 2 additions & 2 deletions src/BarChart2.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Graphics.D3.Examples.BarChart2 where

import Prelude(map,(*),(++),show,(>>>),(-),(/),bind,($))
import Prelude(map,(*),(<>),show,(>>>),(-),(/),bind,($))
import Data.Either
import Data.Array (length)
import Data.Traversable
Expand Down Expand Up @@ -85,7 +85,7 @@ main = do
bar <- chart ... selectAll "g"
.. bindData typedData
.. enter .. append "g"
.. attr'' "transform" (\_ i -> "translate(0," ++ show (i * barHeight) ++ ")")
.. attr'' "transform" (\_ i -> "translate(0," <> show (i * barHeight) <> ")")

bar ... append "rect"
.. attr' "width" (_.value >>> x)
Expand Down
6 changes: 3 additions & 3 deletions src/BarChart3.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Graphics.D3.Examples.BarChart3 where

import Prelude(map,(-),(+),(++),show,(<$>),(<<<),bind)
import Prelude(map,(-),(+),(<>),show,(<$>),(<<<),bind)
import Data.Either
import Data.Array (length)
import Data.Traversable
Expand Down Expand Up @@ -117,7 +117,7 @@ main = do
.. attr "width" (width + margin.left + margin.right)
.. attr "height" (height + margin.top + margin.bottom)
.. append "g"
.. attr "transform" ("translate(" ++ show margin.left ++ "," ++ show margin.top ++ ")")
.. attr "transform" ("translate(" <> show margin.left <> "," <> show margin.top <> ")")

tsv "data/lettersAndFrequencies.tsv" \(Right array) -> do
typedData <- traverse coerceDatum array
Expand All @@ -131,7 +131,7 @@ main = do

svg ... append "g"
.. attr "class" "x axis"
.. attr "transform" ("translate(0," ++ show height ++ ")")
.. attr "transform" ("translate(0," <> show height <> ")")
.. renderAxis xAxis

svg ... append "g"
Expand Down
2 changes: 1 addition & 1 deletion src/ForceLayout1.purs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Graphics.D3.Request
import Graphics.D3.Scale
import Graphics.D3.Selection
import Graphics.D3.Util
import Prelude(Unit(),bind)
import Prelude(Unit(),bind,negate)

-- | This is a PureScript adaptation of the Sticky Force Layout example:
-- | http://bl.ocks.org/mbostock/3750558
Expand Down