Comments (9)
What is your chart.time configuration ?
especially from
from gantt-schedule-timeline-calendar.
You are using moment library to format your strings. You should use GSTC.api.date
with isoWeek plugin
dayjs plugin usage example
example
from gantt-schedule-timeline-calendar.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf8" />
<title>GSTC simple example</title>
<link rel="stylesheet" href="../../dist/style.css" />
<!-- replace this path -->
<link rel="stylesheet" href="../reset.css" />
</head>
<body>
<div id="gstc"></div>
<script src="../../node_modules/dayjs/plugin/isoWeek.js"></script>
<script type="module" src="index.js"></script>
<!-- replace this path -->
</body>
</html>
// @ts-ignore
GSTC.api.dayjs.extend(globalThis.dayjs_plugin_isoWeek);
/**
* @type {import("../../dist/gstc").ChartCalendarLevel}
*/
const weeks = [
{
zoomTo: 21,
period: 'week',
main: true,
periodIncrement: 1,
format({ timeStart, timeEnd, className, vido }) {
console.log(timeStart); // to show the 'timeStart' values on initial render and after updating the state
return vido.html`<div">W:${timeStart.isoWeek()} D:${timeStart.format('dd')}</div>`;
},
},
];
// Configuration object
const config = {
/* ... */
chart:{
calendarLevels: [weeks],
},
locale: {
weekStart: 1,
},
};
const config = {
/* ... */
chart:{
calendarLevels: [weeks],
},
locale: {
weekStart: 0,
},
};
from gantt-schedule-timeline-calendar.
But I see that there is a bug when dynamically changing weekStart
.
from gantt-schedule-timeline-calendar.
fixed in 3.34.4
But you should use integrated dayjs
library as shown above GSTC.api.date
instead of moment
from gantt-schedule-timeline-calendar.
Hi @neuronetio, thank you for looking into it!
I checked the latest version and unfortunately it didn't fix it for me. The behaviour is still the same as described in the first post. Using dayjs
or moment
doesn't change anything :/
from gantt-schedule-timeline-calendar.
@konradvs so you have to show me the code. How can I reproduce this error?
from gantt-schedule-timeline-calendar.
@konradvs what is the result of state.get('config.version')
in your code ?
from gantt-schedule-timeline-calendar.
@neuronetio Unfortunately we can't show our code.
Since reporting this issue, we've decided that we won't use "week" period, so there is no need to dig further. Thank you for looking into this and your help trying to resolve this issue.
from gantt-schedule-timeline-calendar.
Related Issues (20)
- How to display milestone in a diamond shape? HOT 1
- Duplicate items appear when resizing the window HOT 3
- Create new dependencies. HOT 3
- How to add click event to bookmarks ?
- How to sort items inside one row HOT 6
- How to add click event for the "progress-bar" HOT 3
- The data I returned comes with a specific parameter, can the data border be dashed HOT 1
- Select a certain piece of data and click on split to see if it can be split into two parts HOT 2
- Split a progress bar into two progress bars HOT 1
- Updated chart items, how to update the view HOT 3
- 3.33.16 move out stacking items not update row height HOT 11
- Scroll multiplier doesn't work with float numbers and looks laggy HOT 5
- Unhandled typeerror out of nowhere reading 'dataIndex' HOT 2
- when the start date and end date is same the progress bar is not visible HOT 5
- Connection error HOT 1
- How to scroll to position vertically in coding?
- How to change the current column width by dragging the date cell like excel?
- Issue with Rendering Component After Upgrading GSTC to Latest Version HOT 2
- How to entegrate this plugin features to my .net core mvc html page ?
- How to disable selection for scrolling by grid drag on touch devices? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gantt-schedule-timeline-calendar.