Comments (10)
To keep chartkick as flexible as possible, I added the library
option, so you can now do:
<%= line_chart series, library: {legend: {position: "left"}} %>
It's not as clean as your proposed implementation, but I'd like to keep library-specific options separate for now.
from chartkick.
The options are pretty limited right now (just min and max), but I'm open to adding ones that are requested often.
from chartkick.
Cool! I understand you'd like to have specific options over inserting a hash to override the defaults?
Op 14 mei 2013 om 18:16 heeft Andrew Kane [email protected] het volgende geschreven:
The options are pretty limited right now (just min and max), but I'm open to adding ones that are requested often.
—
Reply to this email directly or view it on GitHub.
from chartkick.
Correct, I'd like the options to be independent of the charting library. This way, we can do
:min => 0
vs
options.vAxis.viewWindow.min = 0
from chartkick.
Thanks! Actually, I think this is even nicer.
from chartkick.
I'm trying to pass the lineTension: 0 option to charts.js so I can get straight lines between points instead of Bezier curves. I've tried
line_chart series, library: { lineTension: 0 }
and
line_chart series, library: { options: { lineTension: 0 }}
with no effect.
Any suggestions for the right syntax in this situation?
Thanks!
--Dean
from chartkick.
I am facing a similar problem as @genlighten. Did we find any results?
from chartkick.
Someone found a solution to your problem @genlighten?
from chartkick.
@genlighten I had the same problem, but the following workaround seems to work:
Chart.defaults.global.elements.line.tension = 0.001;
Setting it to 0 doesn't work, but 0.001 does.
from chartkick.
If anyone else finds this issue, I figured out how to get straight lines with Chart.js 2.7.0 and chartkick 2.3.5:
line_chart data, library: { elements: { line: { tension: 0 }}}
Setting it to 0 works fine now, they must have fixed that issue.
(Reference: chartjs/Chart.js#2170 (comment))
from chartkick.
Related Issues (20)
- Charts stuck at "Loading..." [example included] HOT 4
- CSP compliance breaks when used with Turbo Drive w/ and random nonce generator HOT 3
- Add support for chart.js 4.x HOT 3
- Add combo bar/line charts HOT 3
- Jruby Support HOT 1
- Support for Apex Charts HOT 1
- Add support for limiting the serie to a certain time frame HOT 1
- Support for polar (spiderweb) charts HOT 1
- Demo not rendering correctly in Safari HOT 2
- `createChart` is not fired after Turbo Frame renders the view HOT 9
- Comparisons in Two Date Ranges HOT 1
- Error importing Chartkick object HOT 2
- Provide ES module for JS with default exports HOT 1
- Rails 7 Setup Additional Step Needed HOT 4
- Canvas accessibility options like aria-label HOT 1
- preffix and suffix on column HOT 1
- X-axis is converted to integers even if datapoint contains alphanumeric characters HOT 1
- Some plugins not (fully) working with Chartkick with Importmaps HOT 2
- Conflicts with Action_text from rails and do not displaying in production(Heroku) HOT 1
- area_chart stoped do work with limit in ruby query HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chartkick.