Skip to content

Commit

Permalink
- refactoring,
Browse files Browse the repository at this point in the history
- gantt.fillData cleaned up, unnecessary logic removed
- readme updated
  • Loading branch information
uzbeki committed Apr 4, 2024
1 parent 30545ef commit cd33bdd
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 176 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,18 @@ All major browsers that support ES6 or above.


## Features:
- πŸ“ŸPagination support, page data handler set inside `onGetPage` option
- Customizable cell size with `cellSize` option
- πŸ“Ÿ Pagination support, page data handler set inside `onGetPage` option
- πŸ‘‰ Customizable cell size with `cellSize` option
- 🎨 Customizable task(bar) colors with `data[i].values[j].customClass`
- ℹ️ Display short description as hints
- 🏷️ Display short description as hints
- πŸ–±οΈ Scroll with `Shift+mouseWheel`, or faster scroll with `Ctrl+Shift+mouseWheel`
- πŸ“… Mark holidays or today
- πŸ” Zoom in/out
- πŸ†• Drag Sortable Header Support (from v0.3.0)
- πŸ†• ES Module support (from v0.3.0)
- πŸ†• Remember Zoom Level and Header Order (page by page remembering) (from v0.3.5)
- πŸ”œ Resizable Bars (coming soon from v0.4.0)
- πŸ”œ Movable Bars (coming soon from v0.5.0)

## Requirements:
- jQuery v1.10.2 or above:
Expand Down Expand Up @@ -86,8 +91,9 @@ $("#gantt").gantt({
- `source` - json data, defaults to `{}`
- `navigate` - navigation type (buttons, scroll), defaults to `scroll`
- `scrollToToday` - scroll to today, defaults to `true`
- `cookieKey` - cookie key, defaults to `jquery-gantt-chart`
- `useCookie` - use cookie to save last view, defaults to `false`
- `zoomLevelKey` - key to save zoom level, defaults to `jquery-gantt-chart-zoom-level`
- `rememberZoomLevel` - remember current zoom level, defaults to `true`
- `rememberHeaderOrder` - remember header order, defaults to `true`
- `scale` - scale type (hours, days, weeks, months), defaults to `days`
- `maxScale` - maximum scale, defaults to `months`
- `minScale` - minimum scale, defaults to `hours`
Expand Down
27 changes: 17 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
<meta name="url" content="https://bekhruz.com">
<meta name="github" content="https://github.com/uzbeki/jquery-gantt-chart">
<meta name="npm" content="https://www.npmjs.com/package/@uzbeki/jquery-gantt-chart">
<link rel="stylesheet" href="./dist/jquery.gantt.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="./dist/jquery.gantt.min.js"></script>
<!-- <link rel="stylesheet" href="./dist/jquery.gantt.min.css"> -->
<!-- <script src="./dist/jquery.gantt.min.js"></script> -->
<link rel="stylesheet" href="./src/jquery.gantt.css">
<script type="module" src="./src//index.js"></script>
<title>jQuery Gantt Chart Demo</title>
<style>
#gantt {
Expand Down Expand Up @@ -44,19 +46,24 @@ <h1>Gantt Chart as jQuery Component demo</h1>
<section>
<h2>Features</h2>
<ul>
<li>Pagination support, page data handler set inside <code>onGetPage</code> option</li>
<li>Customizable cell size with <code>cellSize</code> option</li>
<li>Customizable task(bar) colors with <code>data[i].values[j].customClass</code></li>
<li>Display short description as hints</li>
<li>Scroll with <code>Shift+mouseWheel</code>, or faster scroll with <code>Ctrl+Shift+mouseWheel</code>
<li>πŸ“Ÿ Pagination support, page data handler set inside <code>onGetPage</code> option</li>
<li>πŸ‘‰ Customizable cell size with <code>cellSize</code> option</li>
<li>🎨 Customizable task(bar) colors with <code>data[i].values[j].customClass</code></li>
<li>🏷️ Display short description as hints</li>
<li>πŸ–±οΈ Scroll with <code>Shift+mouseWheel</code>, or faster scroll with <code>Ctrl+Shift+mouseWheel</code>
</li>
<li>Mark holidays or today</li>
<li>Zoom in/out</li>
<li>πŸ“… Mark holidays or today</li>
<li>πŸ” Zoom in/out</li>
<li>πŸ†• Drag Sortable Header Support (from <code>v0.3.0</code>)</li>
<li>πŸ†• ES Module support (from <code>v0.3.0</code>)</li>
<li>πŸ†• Remember Zoom Level and Header Order (from <code>v0.3.5</code>)</li>
<li>πŸ”œ Resizable Bars (coming soon from <code>v0.4.0</code>)</li>
<li>πŸ”œ Movable Bars (coming soon from <code>v0.5.0</code>)</li>
</ul>
<p>For more, please refer to <a href="https://github.com/uzbeki/jquery-gantt-chart#readme">README file</a>.</p>
</section>

<script>
<script type='module'>
/**
* Generates dummy data for a Gantt chart.
* @param {number} [page=1] - The page number.
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "@uzbeki/jquery-gantt-chart",
"version": "0.2.2",
"description": "Simple Gantt Chart implemented with modernJS and jQuery. Previously known as jQuery.Gantt.",
"main": "./dist/jquery.gantt.min.js",
"homepage": "https://github.com/uzbeki/jquery-gantt-chart#readme",
"version": "0.3.0",
"type": "module",
"main": "./dist/jquery.gantt.js",
"module": "./dist/jquery.gantt.js",
"engines": {
"node": ">= 10.0.0"
},
Expand Down Expand Up @@ -30,7 +33,6 @@
"bugs": {
"url": "https://github.com/uzbeki/jquery-gantt-chart/issues"
},
"homepage": "https://github.com/uzbeki/jquery-gantt-chart#readme",
"devDependencies": {
"clean-css-cli": "^5.6.3",
"terser": "^5.29.2"
Expand Down
Loading

0 comments on commit cd33bdd

Please sign in to comment.