-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
I am having problem displaying barchart with negative values.
I tried to see if anyone has already reported this issue. But judging from #91 it seems negative values is supported all along.
I'm using Contex version 0.5.0
Code
data = [
["A", -10.0],
["B", 20.0],
["C", -50.0]
]
dataset = Contex.Dataset.new(data, ["X", "Y"])
options = [
mapping: %{category_col: "X", value_cols: ["Y"]},
type: :stacked,
data_labels: true,
orientation: :vertical
]
chart =
Contex.Plot.new(dataset, Contex.BarChart, 600, 400, options)
|> Contex.Plot.titles("", "")
|> Contex.Plot.axis_labels("", "")
|> Contex.Plot.plot_options(%{})
|> Contex.Plot.to_svg()
Result

Metadata
Metadata
Assignees
Labels
No labels