Skip to content

Commit

Permalink
support interpolate in Tucan.density/3
Browse files Browse the repository at this point in the history
  • Loading branch information
pnezis committed Dec 30, 2023
1 parent bb4c480 commit 8ebce57
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/tucan.ex
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ defmodule Tucan do
:y,
:orient,
:fill_color,
:interpolate,
:color
],
density_opts
Expand Down Expand Up @@ -753,10 +754,10 @@ defmodule Tucan do
def density(plotdata, field, opts \\ []) do
opts = NimbleOptions.validate!(opts, @density_schema)

spec_opts = Tucan.Options.take_options(opts, @histogram_opts, :spec)
spec_opts = Tucan.Options.take_options(opts, @density_opts, :spec)

mark_opts =
Tucan.Options.take_options(opts, @histogram_opts, :mark)
Tucan.Options.take_options(opts, @density_opts, :mark)
|> Keyword.merge(orient: :vertical)
|> Tucan.Keyword.put_not_nil(:color, opts[:fill_color])
|> Tucan.Keyword.put_not_nil(:filled, opts[:filled])
Expand Down

0 comments on commit 8ebce57

Please sign in to comment.