jsganttimproved / react-jsgantt Goto Github PK
View Code? Open in Web Editor NEWReact gantt component wrapper for jsgantt-improved
React gantt component wrapper for jsgantt-improved
【question】
The date format cannot be set.
I want to reflect the setting of vDateTaskDisplayFormat, what should I do?
I want to display as "yyyy / mm / dd".
[example code]
vTooltipTemplate: t => { return '<div><span class="gTaskLabel">{{Lang:pStart}}:</span><span class="gTaskText">**{{pStart}}**</span></div>' }
I don't understand the example project. There are so many function that are never used somewhere. Maybe it could be updated to show better how to use react-jsgantt? For example how to fetch data from an API. Right now it feels like it would be much easier to just import the standard package?
Could you add Japanese to react-jsgantt?
Tried changing the options in the options prop. Does not seem to pick up the options.
Please let me know if its the right way of passing in options.
Tried below as well:
let editorOptions = [{
vCaptionType: 'Complete', // Set to Show Caption : None,Caption,Resource,Duration,Complete,
vQuarterColWidth: 36,
vDateTaskDisplayFormat: 'day dd month yyyy', // Shown in tool tip box
vDayMajorDateDisplayFormat: 'mon yyyy - Week ww', // Set format to display dates in the "Major" header of the "Day" view
vWeekMinorDateDisplayFormat: 'dd mon',
vEditable: true
}]
And,
Hey guys,
is there an equivalent function for
g.addLang('en2', en)
g.setLang('en2');
in react-jsgantt?
I didn't find a way to add a custom language or did i miss something?
Cheers Tobias
When I forked this project and following the instructions below:
npm i -g rollup
npm install
cd example
npm install
I got a semantic error TS7016 Could not find a declaration file for module 'jsgantt-improved'. I overcame it by following https://stackoverflow.com/questions/41462729/typescript-react-could-not-find-a-declaration-file-for-module-react-material.
Also, when I compared the react-jsgantt I forked & react-jsgantt installed by npm, I found some difference between them, e.g. some css style is missing in react-jsgantt installed by npm. Is there any method to solve this problem?
Thanks
Hello,
I'm getting error when setting vEventClickCollapse
parameter for the chart options:
error:
Uncaught TypeError: this[("set" + key.substr(...))] is not a function
table option:
options: {
vCaptionType: "Complete",
vUseSort: false,
vShowTaskInfoLink: false,
vAdditionalHeaders: {
action: {
title: "Actions",
class: "actions"
}
},
vColumnOrder: [
"vAdditionalHeaders",
"vShowPlanStartDate",
"vShowPlanEndDate",
"vShowStartDate",
"vShowEndDate",
"vShowRes",
"vShowDur",
"vShowComp",
"vShowCost",
"vShowAddEntries"
],
vTooltipTemplate: "<b>{{pName}}</b>",
vShowPlanStartDate: true,
vShowPlanEndDate: true,
vQuarterColWidth: 36,
vDateTaskDisplayFormat: "day dd month yyyy", // Shown in tool tip box
vDayMajorDateDisplayFormat: "mon yyyy - Week ww", // Set format to display dates in the "Major" header of the "Day" view
vWeekMinorDateDisplayFormat: "dd mon",
vEventClickRow: (e) => {
console.log(e);
},
vEventClickCollapse: (e) => {
console.log(e);
}
}
};
error coming from index.js
:
...
exports.includeGetSet = function () {
/**
* SETTERS
*/
this.setOptions = function (options) {
var keys = Object.keys(options);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var val = options[key];
if (key === 'vResources' || key === 'vColumnOrder') {
// ev = `this.set${key.substr(1)}(val)`;
this['set' + key.substr(1)](val);
}
else if (val instanceof Array) {
// ev = `this.set${key.substr(1)}(...val)`;
this['set' + key.substr(1)].apply(this, val);
}
else {
// ev = `this.set${key.substr(1)}(val)`;
this['set' + key.substr(1)](val); // <-- throws error here
}
}
};
....
Note that vEventClickRow
functions perfectly, but vEventClickCollapse
throws error.
"react": "^15.4.2",
"react-dom": "^15.4.2",
"react-jsgantt": "^2.4.3"
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.