Basic bar tooltip question

I cannot get this running.
What should be set to the Place of Datum?
Lines 12 and 21
โ€“ NAMING ERROR ----
I cannot find a Datum type:

12| { hovering : List (CI.One Datum CI.Bar) }
^^^^^
These names seem close though:
Int
Maybe
Sub
CI.Item

It accepts Int in that place, is it Ok?
Does Datum mean here just the type of data used?

Next question, how should the data be on the line 48?
I used the data of another example for Basic bar.
Is this Ok? (Well, propably not because here are stacked bars.)
[ { x = 1, y = 3, z = 1 }
, { x = 2, y = 2, z = 3 }
, { x = 3, y = 4, z = 2 }
]

Is there anywhere presented a complete code which works for this example?

https://package.elm-lang.org/packages/terezka/elm-charts/latest/Chart-Item#One

I think there is an type alias Datum = ... in the example missing, which represents the (one) data.

This is the example with all the code needed: elm-charts/TrickyTooltip.elm at master ยท terezka/elm-charts ยท GitHub

I tried to run this but there is something wrong with main missing.
See this https://ellie-app.com/jV7BYrv4Y3Na1

The main function needs to return a Program, so: https://ellie-app.com/jV9ntzpv6pVa1

Docs for Browser are here: Browser - browser 1.0.2

1 Like

Thank you for help, this works Ok.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.