aysark / dashing-timeline Goto Github PK
View Code? Open in Web Editor NEWStylish timeline widget for Dashing.io
License: MIT License
Stylish timeline widget for Dashing.io
License: MIT License
The widget ID described in README.md
(a_timeline
) does not match the ID being sent in jobs/timeline.rb
(ags_timeline
).
as the title states, it seems the size is hardcoded in the timeline.coffee, so it fixes it at that size and when a grid layout is setup that is different, then the widget doesn't fit the new layout.
in timeline.rb the send_event needs to be updated to match the README.md file.
it should send data to a_timeline, not to ags_timeline
Hi,
I would like to show 2 timelines on my dashboard with 2 different data-id:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="2">
<div data-id="timeline_data_a" data-view="Timeline" data-title="Timeline A"></div>
</li>
<li data-row="1" data-col="1" data-sizex="1" data-sizey="2">
<div data-id="timeline_data_b" data-view="Timeline" data-title="Timeline B"></div>
</li>
But because the TimeKnots draw is called like this: TimeKnots.draw('.timeline', events, {})
in the coffee script, there is a conflict between the two widgets (same class).
I suggest to replace the .timeline
selector by something like @node.getElementsByClassName('timeline')[0]
which depends directly on the widget thanks to the @node
selector.
What do you think ?
(Thanks for the widget BTW)
Hi,
thanks for the awesome widget!
I've tried to make a full-width timeline graph where more information can be displayed per event.
The container (svg) has already the fulll size (4 segments - 1500px x 900px) but the text is still placed the same as it would only be the with of one segment instead of 4 (centered in the middle).
Is there an easy way to define that the text will be aligned according to the width of the svg-container?
Thanks for the help!
I am currently getting around this by downloading a moment.js file and putting it in assets/javascript folder.
README.js should call out the dependency.
HI,
i created a new job file that extracts information from an excel file and send it to the widget.
i tried that job file with "List" widget and "birthday" and data shows correctly, but when i try it with the TIMELINE widget, data never shows up, i just get an empty grey rectangle with the title on the top, that's it.
can someone help me with it please?
thanks
this is my code:
require 'date'
require 'roo'
require 'active_support'
require 'active_support/core_ext'
timeline_FILENAME = 'timeline_data.xlsx'
SCHEDULER.every '3s', :first_in => '1s' do
timeline = []
timeline_report = Roo::Excelx.new(timeline_FILENAME)
(2..timeline_report.last_row).each do |row|
name = timeline_report.cell(row, 1)
name.sub!(/(\S+),\s_(\S+)._/, '\2 \1')
date = timeline_report.cell(row, 2)
date = Date.new(Date.today.year, date.month, date.day)
if date < Date.today then
date += 1.year
end
timeline.push({name: name, date: date})
end
timeline = timeline.sort{|a, b| a[:date] <=> b[:date]}[0..9]
timeline_data = []
timeline.each do |timeline|
timeline_data.push({
'label' => timeline[:name],
'value' => timeline[:date].strftime("%-m/%-d")
})
end
send_event('data', { items: timeline_data,
class: 'icon icon-background icon-calendar'})
end
Hello,
I installed your timeline and it is displayed, however I do not know wher i put the file "timeline_data.yml" and I do not have dates. Where should I paste this file?
Thank you
Maxime
Very awesome! Could you please add a license to this project though?
Hi,
In the timeknots.js file
it is looking for var timestamps = events.map(function(d)
but seems like events is not defined.
I have tried everything but nothing works.
If you can provide some insight as to what I am missing.
Thanks,
Sid
Hi!
I have followed the instructions and added the files in the locations specified. After adding
<li data-row="1" data-col="1" data-sizex="1" data-sizey="2">
<div data-id="a_timeline" data-view="Timeline" data-title="Timeline"></div>
</li>
to the dashboard .erb file as well as adding moment.min.js to the layout.erb file like this there is simply nothing showing in the dashboard.
<!-- The javascript and css are managed by sprockets. The files can be found in the /assets folder-->
<script type="text/javascript" src="/assets/application.js"></script>
<script type="text/javascript" src="/assets/moment.min.js"></script>
<link rel="stylesheet" href="/assets/application.css">
As i can't see anything in the dashboard and there are no error messages when I start up smashing I am struggling to see what I am doing wrong, any help would be appreciated!
I can find the file on a Mac OS X Yosemite if I put timeline_data.yml in the jobs directory and change this line as follows in timeline.rb job.
#config_file = File.dirname(File.expand_path(__FILE__)) + '../timeline_data.yml'
config_file = File.dirname(File.expand_path(__FILE__)) + '/timeline_data.yml'
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.