mbielanczuk / jquery.gantt Goto Github PK
View Code? Open in Web Editor NEWjQuery Gantt Chart
Home Page: http://mbielanczuk.com/?p=34
jQuery Gantt Chart
Home Page: http://mbielanczuk.com/?p=34
You have a bug in the preview page. For some reason, the script tag at the bottom of the page is currently:
<script src="js/jquery.fn.gantt.min2.js"></script>
It should be:
<script src="js/jquery.fn.gantt.min.js"></script>
(It also looks like the demo page is way out of date compared with development, but that's a different issue.)
Hello, in jquery.fn.gantt.js in line 189 u have
if ($.browser.msie) {
x -= $(document).scrollLeft();
y -= $(document).scrollTop();
} else {
x -= window.pageXOffset;
y -= window.pageYOffset;
}
$.browser is removed from jquery 1.9, so it would be nice to upgrade it.
In case someone wants to do that , i found that:
link jQuery.browser() removed
The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed in 1.9. If needed, it is available as part of the jQuery Migrate plugin. We recommend using feature detection with a library such as Modernizr.
if the first week is 44 of 2011, for example, and you scroll left and right and end up on week 45, as in the linked img, the navigation buttons to the left won't work, cause 45 - 7 < 41 (44 - 3 blank), but you could just easily put it to 41
i've done it so here's the code:
in the core.navigateto, in de default case of the switch
default:
var max_left = (dataPanelWidth - rightPanelWidth) * -1;
var cur_marg = $dataPanel.css("margin-left").replace("px", "");
var val = parseInt(cur_marg, 10) + val;
if (val > 0) { val = 0; } // si veut aller trop loin
if (val < max_left) { val = max_left;} // dans l'autre sens
// if (val <= 0 && val >= max_left) {
$dataPanel.animate({
"margin-left": val + "px"
}, "fast", core.repositionLabel(element));
//}
element.scrollNavigation.panelMargin = val;
break;
Hey, was wondering if you would make it possible to edit the events right on the gantt chart?
The render speed on large sets is really slow. For some reason Chrome performance is roughly 3x worse than IE9 on my particular example (4,300ms vs. 1,500ms). It almost seems like it's rendering every row, but only showing the first X until you hit next page.
You might want to investigate how many repaints and reflows are being executed. DOM creation via strings might have to be the solution.
I think you should use range typed input for the slider/scroll. I really like what is done in jQuery mobile as you can move the slider left/right with keyboard and mouse scroll (when the input is active).
See here for an example HTML5 slider:
http://code.jquery.com/mobile/latest/demos/docs/about/getting-started.html
Am I missing something or data is allways null in onItemClick? Same thing for rowId in onAddClick.
This is something jsGantt has - the dependencies are drawn based on a list of IDs of tasks. See example at jsgant.com - tasks "Constructor Proc" and "Task Variables".
BTW ID would be nice to have as you can generate basic Gantt from Tasks added to something like Flyspray ;-) or Bugzilla.
Loading GanttView in "months" or "weeks" scale doesnt load correctly. It lets an item only have the length of 1 column. But when minScale is "weeks"and scale is "days", the Gantt is displayed correctly in week scale.
Screenshot: http://i42.tinypic.com/2dmavcm.jpg
empty
Not visible task at the turn of the year - ie. for dates:
From: Date(1293874598708)
To: Date(1354268198708)
The gantt starts in 2011, but the bar isn't displayed. It starts not till the last week of december of 2011. In month view it is displayed correct. I have no clue where to search.
hi, recently we want to add your lib on https://cdnjs.com, v1.1.0 seems to be released long time ago, could you please consider releasing a new version and add a tag for it so that we can add your lib and set git auto-update for the structure different from v1.1.0.
thank you very much!
hi, recently we want to add your lib on https://cdnjs.com, we use npm auto-update or git auto-update(depended on git tags) to add every released version, so could you please consider adding tags for every released version?
thank you very much!
@florian: "...integrate some kind of label for each bar, which is also displayed in the chartt. E.g. the "name"-field. So that the bar isn't only coloured, but also labeled..."
Hello.
Requesting for an export to excel or pdf or export as an image functionality of the gantt chart. This would be very helpful for us. Would implementing this functionality be possible? :)
Thanks in advance!
Hi all, I am wondering how to use external data source, but not json file, but asp webservice.
If I do this:
source: dataPath + "js/Meetings.js"
gantt is displayed correct,
but if I do this:
source: dataPath + "Meetings.asmx/GetAll"
I get error:
[InvalidOperationException]: Format żądania jest nierozpoznany dla adresu URL nieoczekiwanie kończącego się w „/GetW”.
w System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
w System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
w System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
w System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
w System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
w System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
How to correct this or any ideas how to use asp webservice result?
Hi,
I noticed that the "Please wait" message is showing after the HTTP request for JSON data is returned to the client.
As a quick test i issued a sleep command for 60 seconds on the server before returning JSON data. During this time the webpage is blank and the "Please Wait..." message does not appear.
After 60 seconds and ALL of the JSON data is returned to the client do i see "Please Wait...". By that time there's no real value anymore for the message since the grid rendering on client browser is very quick.
Would it be possible to change the sequence of the "Please Wait..." message? Ideally it should displayed as soon as the page loads.
I had a look at the code but not really sure where to make the change - If you can point me i can try to update the code.
Thanks for your time.
It is impossible in the current code to override the default custom week calculation (or any prototype for that matter) because it is set each time on rendering.
Preferably the prototyping is NOT done on rendering, because that would override the new 'custom' override.
It should be done before applying the plug-in to jQuery (e.g. before $.fn.gantt = function (options) { ).
Because it is already a custom prototype function, there is no functional need to re-apply it every time other than that you want the default version to be the only truth...
@jan:
I get a javascript error in IE8 on load jquery.fn.gantt.js on line 918: find(…).offset().left is null or not an object
The gantt scheme is afterwards empty.
Hello.
Requesting for an export to excel or pdf functionality of the gantt chart. This would be very helpful for us. Would implementing this functionality be possible? :)
Thanks in advance!
Jens:
i worked it out and found a bug.
try as data a very long interval like:
{“from”: “/Date(1302203200000)/”, “to”: “/Date(1310508000000)/”, “desc”: “Type: Taskname: Task 3Description: Task desc.”, “customClass”: “ganttRed”},
Only this Entry will be shown, all others are “hidden”
New navigation mechanism including:
createProgressBar: function (days, cls, desc, label, dataObj) miss a parameter day.id,after the days;
I think this function is right, invoke this function give more parameter is the true bug occurs , because day.id is not use in this function.you maybe forget to remove day.id at the code of invoke this function
@fox
Great code can you have a single day view with time?
@jack
Great code! Can you change the “row header year” to “row header day” and “row header month” to “row header hour”?
@marcelo:
I like this very much. But I wonder if there is a simple way to Cutomize hours versus days?
Because I need a time grid of days (line) and hour (column), along with progress bars.
To specificly identify bars we need some sort id. Best way to resolve this is to supply them in the data JSON.
The label is always centered. That means when there is a long task you need to scroll a lot until you get to see the label, at least at days-view.
@florian: "In the weeks view in February 2012 the week 9 is labeled with "8" so that the 8 is displayed twice."
is it possible to have multiple dependencies?, f.e. you have 3 task, a,b,c, but c needs to start only when a and b has done. and b needs a has done too. thanks a lot!
Hi
I want to switch to today after the chart is rendered. I guess I have to set the scrollToTOday to true, but my chart always stays at the beginning.
Please assist.
cheers
Martin
It works fine with IE 9 but doesnt’t work with IE 8.
by @simone
THe current renderign of right pane isn't optimal, just take the exemple and zoom it to hours to see your browser crash.
The problem is the parseTimeRange
function (and the rendering of hour divs). I think the best solution would be to draw only a bit more then what is visible, so it would support almost unlimiter range of values.
RT
Items get lost in the month view when there is more than one per line.
Need a mechanism to add columns to the information on the left side of the chart.
The left side of the chart's width should be easily adjustable
how to show the calendar from the current date?
Is there a parameter?
Is there a way to render the chart without vertical pagination? If i had 50 tasks then i want to show all 50 in one page?
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.