Javascript 在 HTML/JS/CSS 中创建时间线图表

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11606618/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 06:31:40  来源:igfitidea点击:

Create timeline chart in HTML/JS/CSS

javascripthtml

提问by Sovanrith Prak

I need some help or concept from all of you. I want to create a timeline chart with web technology to display tasks that have start and end date on web browser. What technology or concept to create a timeline graphic chart on the browser would be helpful?

我需要你们所有人的帮助或概念。我想使用 Web 技术创建一个时间线图表,以在 Web 浏览器上显示具有开始和结束日期的任务。在浏览器上创建时间线图形图表的技术或概念有什么帮助?

回答by Ryan Atallah

Using preexisting tools:

使用预先存在的工具:

You could build a calendar using a number of calendar plugins that exist, like FullCalendarfor jQuery, or any of these other plugins.

您可以使用许多现有的日历插件来构建日历,例如用于 jQuery 的FullCalendar或任何其他插件

Timeline sliders exist, also for jQuery, like Timeline JS, jQuery Timelinr, Timeglideror Tiki-Toki, of which I think the last sounds more aptly suited to your cause.

时间轴滑块也存在于 jQuery 中,例如Timeline JSjQuery TimelinrTimegliderTiki-Toki,我认为最后一个听起来更适合您的事业。

回答by Chris Kline

If you want a super-simple, non-interactive, way of displaying timeline data in a few lines of HTML, you can use the Google Charts API to do it. Here's a self-contained example: https://gist.github.com/KorkyPlunger/16c540f7b622b8906c1351e44bf1bf3c

如果您想要一种超级简单、非交互式的方式,以几行 HTML 显示时间轴数据,您可以使用 Google Charts API 来实现。这是一个独立的示例:https: //gist.github.com/KorkyPlunger/16c540f7b622b8906c1351e44bf1bf3c