GithubHelp home page GithubHelp logo

aysark / dashing-timeline Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 7.0 94 KB

Stylish timeline widget for Dashing.io

License: MIT License

JavaScript 74.30% Ruby 9.16% CoffeeScript 9.75% HTML 0.46% CSS 6.34%

dashing-timeline's People

Contributors

aysark avatar dreezey avatar rompic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dashing-timeline's Issues

Cannot show more than one timeline on the same dashboard

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)

Full-width timeline graph -> horizontal text alignment

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!

Cannot get the widget to read data from excel file, and with original widget date don't show up!

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

get next 10 timeline

timeline = timeline.sort{|a, b| a[:date] <=> b[:date]}[0..9]

assemble data to send to client

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

timeline_data.yml

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

LICENSE?

Very awesome! Could you please add a license to this project though?

Uncaught TypeError: Cannot read property 'map' of undefined

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

Timeline not showing up

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!

mac os X has timeline not being found

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'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.