module Web.Lightning.Plots.GraphBundled
(
GraphPlot(..)
, Visualization(..)
, graphBundledPlot
)
where
import Control.Monad.Reader
import qualified Web.Lightning.Routes as R
import Web.Lightning.Plots.Graph (GraphPlot(..))
import Web.Lightning.Types.Lightning (LightningT, sendPlot)
import Web.Lightning.Types.Visualization (Visualization (..))
graphBundledPlot :: Monad m => GraphPlot
-> LightningT m Visualization
graphBundledPlot graphPlt = do
url <- ask
viz <- sendPlot "graph-bundled" graphPlt R.plot
return $ viz { vizBaseUrl = Just url }