{"id":17181543,"url":"https://github.com/dimitarchristoff/timeplunk","last_synced_at":"2025-03-25T00:43:50.804Z","repository":{"id":19185278,"uuid":"22418111","full_name":"DimitarChristoff/timeplunk","owner":"DimitarChristoff","description":"tiny timeline picker for d3","archived":false,"fork":false,"pushed_at":"2015-03-13T12:59:07.000Z","size":256,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T03:32:43.813Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"centrifugal/centrifugo","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DimitarChristoff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-30T08:45:06.000Z","updated_at":"2015-03-13T12:59:04.000Z","dependencies_parsed_at":"2022-09-15T01:12:37.023Z","dependency_job_id":null,"html_url":"https://github.com/DimitarChristoff/timeplunk","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimitarChristoff%2Ftimeplunk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimitarChristoff%2Ftimeplunk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimitarChristoff%2Ftimeplunk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimitarChristoff%2Ftimeplunk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DimitarChristoff","download_url":"https://codeload.github.com/DimitarChristoff/timeplunk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245377961,"owners_count":20605375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T00:34:36.927Z","updated_at":"2025-03-25T00:43:50.780Z","avatar_url":"https://github.com/DimitarChristoff.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"timeplunk\n=========\n\nTiny timeline picker for d3. Used to display and normalise events on a timeline and allows for a range selection (brush).\n\n![timeplunk in action](https://raw.githubusercontent.com/DimitarChristoff/timeplunk/master/example/tp.png)\n\n## Installing\n\nYou can install from bower:\n\n```sh\n$ bower install timeplunk\n```\n\nOr you can clone the repo or download the `timeplunk.js` file.\n\n## Dependencies\n\nd3, d3-tip, jquery (just object merge for options).\n\nAdditionally, `timeplunk.css` is needed (just copy and style your own svg elements).\n\n## Use\n\nTimePlunk is written with a UMD wrap so it works as a AMD module as well as via global objects.\n\n```javascript\n// no AMD, assumes d3, d3.tip and $ are loaded\nvar timeplunk = new TimePlunk('svg.tp', {\n\tmaxTicks: 5,\n\tonBrush: function(a, b){\n\t\ta = new Date(a), b = new Date(b);\n\t\tout.html('\u003cstrong\u003eSELECTED RANGE:\u003c/strong\u003e ' + format(a) + ' - ' + format(b));\n\t},\n\ttooltipFormat: function(d){\n\t\treturn d.nice + ' \u003cspan style=\"color:red\"\u003e' + d.y + ' commits\u003c/span\u003e';\n\t},\n\theight: 110\n});\n\n// or requirejs, assumes `d3`, `d3-tip` and `jquery` are defined in your `require.config`\nrequire(['timeplunk'], function(TimePlunk){\n\tnew TimePlunk('svg.tp', { ... });\n});\n```\n\n## API\n \n### Constructor \n\nThe constructor supports 2 arguments:\n\n - @param `{String} element` selector to bind to\n - @param `{Object=} options` optional overrides\n\nThe options are as follows:\n\n```javascript\n({\n\t// margins\n\ttop: 0,\n\tbottom: 20,\n\tright: 0,\n\tleft: 0,\n\n\t// base width/height\n\twidth: 300,\n\theight: 90,\n\n\tinterpolateMethod: 'linear',\n\n\t// xAxis\n\tmaxTicks: 3,\n\n\tbrushEvent: 'brushend', // also brush, brushstart etc. d3 docs.\n\n\t// date format\n\tdateFormat: '%d/%m/%y',\n\n\t// tooltip\n\ttooltipClass: 'd3-tip',\n\ttooltipsEnabled: true \u0026\u0026 d3tip,\n\ttooltipFormat: function(d){\n\t\treturn d.nice + ' \u003cspan style=\"color:red\"\u003e' + d.y + '\u003c/span\u003e';\n\t},\n\n\t/**\n\t * @description handler for brush selection, returns d3.brush.extent\n\t * @param {Date.toString} start\n\t * @param {Date.toString} end\n\t */\n\tonBrush: function(start, end){},\n\n\t// function that parses\n\tdataParser: null\n});\n```\n\nYou can override any of the defaults or leave as is.\n\n### setData\n\nMethod used to pass on the data. \n\n - @param `{Array} data`\n - @param `{Boolean=} clearBrush` selection when truthy\n\nFor more, read the source, it's tiny.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimitarchristoff%2Ftimeplunk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimitarchristoff%2Ftimeplunk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimitarchristoff%2Ftimeplunk/lists"}