Snif marche po.
J'essaye de remplacer ca:
par:
c'est bon fallait ajouter bandInfos[i].decorators = new Array(); juste avant.
J'essaye de remplacer ca:
Code :
bandInfos[i].decorators = [
new Timeline.SpanHighlightDecorator({
startDate: deb[0],
endDate: fin[0],
color: couleurs[0],
opacity: 40,
startLabel: label[i + "-" + 0],
endLabel: "",
cssClass: 'titre-zone-historique'
}),
new Timeline.SpanHighlightDecorator({
startDate: deb[1],
endDate: fin[1],
color: couleurs[1],
opacity: 40,
startLabel: label[i + "-" + 1],
endLabel: "",
cssClass: 'titre-zone-historique'
}),
new Timeline.SpanHighlightDecorator({
startDate: deb[2],
endDate: fin[2],
color: couleurs[2],
opacity: 40,
startLabel: label[i + "-" + 2],
endLabel: "",
cssClass: 'titre-zone-historique'
}),
new Timeline.SpanHighlightDecorator({
startDate: deb[3],
endDate: fin[3],
color: couleurs[3],
opacity: 40,
startLabel: label[i + "-" + 3],
endLabel: "",
cssClass: 'titre-zone-historique'
}),
new Timeline.SpanHighlightDecorator({
startDate: deb[4],
endDate: fin[4],
color: couleurs[4],
opacity: 40,
startLabel: label[i + "-" + 4],
endLabel: "",
cssClass: 'titre-zone-historique'
}),
new Timeline.SpanHighlightDecorator({
startDate: deb[5],
endDate: fin[5],
color: couleurs[5],
opacity: 40,
startLabel: label[i + "-" + 5],
endLabel: "",
cssClass: 'titre-zone-historique'
}),
new Timeline.SpanHighlightDecorator({
startDate: deb[6],
endDate: fin[6],
color: couleurs[6],
opacity: 40,
startLabel: label[i + "-" + 6],
endLabel: "",
cssClass: 'titre-zone-historique'
})
];
par:
Code :
for (var ii = 0; ii < 6; ii++)
{
bandInfos[i].decorators.push(
new Timeline.SpanHighlightDecorator({
startDate: deb[ii],
endDate: fin[ii],
color: couleurs[ii],
opacity: 40,
startLabel: label[i + "-" + ii],
endLabel: "",
cssClass: 'titre-zone-historique'})
);
}
c'est bon fallait ajouter bandInfos[i].decorators = new Array(); juste avant.