terezka / charts Goto Github PK
View Code? Open in Web Editor NEWMake charts! Alpha version.
Home Page: https://alpha.elm-charts.org/
License: BSD 3-Clause "New" or "Revised" License
Make charts! Alpha version.
Home Page: https://alpha.elm-charts.org/
License: BSD 3-Clause "New" or "Revised" License
In the elm.json file I would expect the "elm-explorations/test": "1.2.2 <= v < 2.0.0",
to be in the test-dependencies?
{
"type": "package",
"name": "terezka/charts",
"summary": "SVG charts components in Elm.",
"license": "BSD-3-Clause",
"version": "17.0.0",
"exposed-modules": [
"Chart.Attributes",
"Chart.Events",
"Chart.Item",
"Chart.Svg",
"Chart"
],
"elm-version": "0.19.0 <= v < 0.20.0",
"dependencies": {
"debois/elm-dom": "1.3.0 <= v < 2.0.0",
"elm/core": "1.0.0 <= v < 2.0.0",
"elm/html": "1.0.0 <= v < 2.0.0",
"elm/json": "1.0.0 <= v < 2.0.0",
"elm/regex": "1.0.0 <= v < 2.0.0",
"elm/svg": "1.0.1 <= v < 2.0.0",
"elm/time": "1.0.0 <= v < 2.0.0",
"myrho/elm-round": "1.0.4 <= v < 2.0.0",
"ryannhg/date-format": "2.3.0 <= v < 3.0.0",
"terezka/intervals": "2.0.0 <= v < 3.0.0"
},
"test-dependencies": {
"elm-explorations/test": "1.2.2 <= v < 2.0.0", // this line
}
}
I tried reading the docs on elm.json but they seem to be outdated a bit ... I think that you do not want to ship the tests in a library?
Also debois/elm-dom is no longer maintained actively.
You are using DOM
in charts/src/Internal/Svg.elm
and it is also imported in charts/src/Chart/Svg.elm
but not used
You could get the boundingClientRect with Browser.Dom.getElement
- getting the parent element would be a bit more tricky.
Adding CA.static
to the docs/examples/Interactivity/BasicLine.elm causes tooltips to offset to the right of their expected position.
Charts version 15.0.0
Ellie of misbehavior:
https://ellie-app.com/dJ4mPHQXLh3a1
A workaround is to make the width of the container the chart is in match the charts width, but then we probably don't need CA.static
anyway.
Ellie of workaround:
https://ellie-app.com/dJ56mvJS8ZKa1
My tooltips felt a bit sluggish (at least in Debug mode), so I took a quick gander at the code. It looked like a straight distance function with squareroot was used for CE.getNearest
, but taking the square isn't necessary when just ordering distances and is expensive compared to just multiplying.
I could make a PR this weekend if that is of interest.
This package looks really promising!
Version used: 13.0.1
I noticed something strange on my axis with ticks and labels using CA.times
:
For other similar intervals it looks as expected:
Another interval gave some good clues about what is going on:
The 07:14 label above seems to belong to a 07:14:14 value. It looks like some rounding down to the new, higher "time unit" (minute in this case) for the first value larger than the "time unit" is the culprit.
Without having looked at the source code:
A solution would be to not round the first value of any given minute or better yet: always find the nice tick positions, i.e. whole, exact time units for the "larger" unit and multiples of 5 for the "smaller" unit (for minutes and seconds).
Hey @terezka – ran into this today on one of my projects:
$ npx elm-test-rs tests/BillingTest.elm
Error: Failed to solve dependencies for tests to run
Caused by:
This version of elm-test-rs only supports elm-explorations/test 2.0.0 <= v < 3.0.0, but you have version 1.2.2 in your dependencies
When I went to update the version:
$ npx elm-json install elm-explorations/[email protected]
-- NO VALID PACKAGE VERSION ----------------------------------------------------
Because terezka/charts 11.0.1 depends on elm-explorations/test 1.2.2 <= v <
2.0.0 and this project depends on elm-explorations/test 2.2.0, terezka/charts
11.0.1 is incompatible with this project.
And because this project depends on terezka/charts 11.0.1, no valid set of
package versions could be found.
I don't think this will be a blocker as I could probably vendor the entirety off terezka/charts
but thought you'd want to know :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.