Sorry,
I did have a data error. And did not change the varible. Therefore they ware out of scale.
I also applied Tucan. Which greatly reduces the amount of code.
def create_compare_graph(sentiment_data_source, poll_data_source, title, party) do
Tucan.layers([
Tucan.lineplot(poll_data_source, "day", party, line_color: "red"),
Tucan.lineplot(sentiment_data_source, "day", party, line_color: "green")
])
|> Tucan.set_width(500)
|> Tucan.set_title(title)
|> Tucan.Axes.set_x_title("Day of the year")
|> Tucan.Axes.set_y_title("Sentiments, Polls")
|> Tucan.Scale.set_y_domain(0,1)
end
The only thing I would like to add is a Legend.


















