QuickPlot
QuickPlot copied to clipboard
options of the chart
Is it possible to custom the chart such as adding title, (x|y)axis title or legend options ?
Taking this example:
boxLine x y = do
let box = [plotly|{
x : #{ x },
y : #{ y },
type : "lines"
}|]
return box
How do you add a title, a legend (label of the curve) ?
Is it possible right now or the library needs more development/help ?
Thanks in advance for your answer and your great work
Yes it is possible. If you look into Plotly.hs you can see there is an instance that lets you pass PlotlyLayout
. So plot (data, layout)
would do the trick.
I would recommend visiting plot.ly first if you don't know how to do X. Here are examples for legends.
Ok, still looking for the way to build a PlotlyLayout (even if the example in javascript are clear for me). Do you have a minimal example please in order to understand the syntax? Thanks in advance.
You pass the layout options just like you pass the data. Almost copy and paste from the website. But in this case this seems to be broken. Somehow plot.ly refuses to show them inside the rectangle. And unfortunately enough, JavaScript doesn't say a thing about it...
So yeah this is a bug.