Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i run this code? yarn build is just building the code and it is not display the chart. Kindly help. #1

Closed
selvaonline opened this issue Oct 12, 2020 · 1 comment

Comments

@selvaonline
Copy link

How can i run this code? yarn build is just building the code and it is not display the chart. Kindly help.

@shybovycha
Copy link
Owner

shybovycha commented Oct 13, 2020

See example.html and index.js.

Also, read the first blog about the thing.

Sample usage is:

const data = [
  {
    startDate: '2017-02-27',
    endDate: '2017-03-04',
    label: 'milestone 01',
    id: 'm01',
    dependsOn: []
  }, {
    startDate: '2017-02-23',
    endDate: '2017-03-01',
    label: 'milestone 06',
    id: 'm06',
    dependsOn: ['m01']
  }, {
    duration: [7, 'days'],
    endDate: '2017-03-24',
    label: 'milestone 02',
    id: 'm02',
    dependsOn: ['m04']
  }, {
    startDate: '2017-02-27',
    duration: [12, 'days'],
    label: 'milestone 03',
    id: 'm03',
    dependsOn: ['m01']
  }, {
    endDate: '2017-03-17',
    duration: [5, 'days'],
    label: 'milestone 04',
    id: 'm04',
    dependsOn: ['m01']
  }
];

createGanttChart(
  document.querySelector('body'),
  data,
  {
    elementHeight: 20,
    sortMode: 'date', // alternatively, 'childrenCount'
    svgOptions: {
      width: 1200,
      height: 400,
      fontSize: 12
    }
  }
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants