Graphique en timeline

pepsi

XLDnaute Occasionnel
Bonjour le forum
j 'essaye de mettre en forme un graphique de type timeline pour afficher des dates de projets.


J'ai annoté mon fichier qui présente des incohérences d'affichage de données.

Si quelqu'un peut regarder et corriger l'affichage ...

Merci d'avance
 

Pièces jointes

  • Projet.xlsx
    15.5 KB · Affichages: 60
  • Projet.xlsx
    15.5 KB · Affichages: 87
  • Projet.xlsx
    15.5 KB · Affichages: 86

Modeste geedee

XLDnaute Barbatruc
Re : Graphique en timeline

Bonsour®

sans add-in , mais une macro :
http://support.microsoft.com/kb/213750
VB:
Sub AttachLabelsToPoints()

   'Dimension variables.
   Dim Counter As Integer, ChartName As String, xVals As String

   ' Disable screen updating while the subroutine is run.
   Application.ScreenUpdating = False

   'Store the formula for the first series in "xVals".
   xVals = ActiveChart.SeriesCollection(1).Formula

   'Extract the range for the data from xVals.
   xVals = Mid(xVals, InStr(InStr(xVals, ","), xVals, _
      Mid(Left(xVals, InStr(xVals, "!") - 1), 9)))
   xVals = Left(xVals, InStr(InStr(xVals, "!"), xVals, ",") - 1)
   Do While Left(xVals, 1) = ","
      xVals = Mid(xVals, 2)
   Loop

   'Attach a label to each data point in the chart.
   For Counter = 1 To Range(xVals).Cells.Count
     ActiveChart.SeriesCollection(1).Points(Counter).HasDataLabel = _
         True
      ActiveChart.SeriesCollection(1).Points(Counter).DataLabel.Text = _
         Range(xVals).Cells(Counter, 1).Offset(0, -1).Value
   Next Counter

End Sub
 

pepsi

XLDnaute Occasionnel
Re : Graphique en timeline

Bonsour®

sans add-in , mais une macro :
How to use a macro to add labels to data points in an xy scatter chart or in a bubble chart in Excel
VB:
Sub AttachLabelsToPoints()

   'Dimension variables.
   Dim Counter As Integer, ChartName As String, xVals As String

   ' Disable screen updating while the subroutine is run.
   Application.ScreenUpdating = False

   'Store the formula for the first series in "xVals".
   xVals = ActiveChart.SeriesCollection(1).Formula

   'Extract the range for the data from xVals.
   xVals = Mid(xVals, InStr(InStr(xVals, ","), xVals, _
      Mid(Left(xVals, InStr(xVals, "!") - 1), 9)))
   xVals = Left(xVals, InStr(InStr(xVals, "!"), xVals, ",") - 1)
   Do While Left(xVals, 1) = ","
      xVals = Mid(xVals, 2)
   Loop

   'Attach a label to each data point in the chart.
   For Counter = 1 To Range(xVals).Cells.Count
     ActiveChart.SeriesCollection(1).Points(Counter).HasDataLabel = _
         True
      ActiveChart.SeriesCollection(1).Points(Counter).DataLabel.Text = _
         Range(xVals).Cells(Counter, 1).Offset(0, -1).Value
   Next Counter

End Sub

Merci pour ta réponse mais le code je le mets ou ?
il faut qu'il s'exécute à l'ouverture de fichier ?
 

Modeste geedee

XLDnaute Barbatruc
Re : Graphique en timeline

Bonsour®
ou bien utiliser un diagramme de Gantt (barres horizontales)
mais dans ce cas il manque :
- charges prévues (Jr)
- charges réalisées (jr)

Capture.jpg
 

Pièces jointes

  • Capture.jpg
    Capture.jpg
    40.4 KB · Affichages: 147
  • Capture.jpg
    Capture.jpg
    40.4 KB · Affichages: 150
Dernière édition:

Discussions similaires

Réponses
1
Affichages
169

Membres actuellement en ligne

Statistiques des forums

Discussions
312 177
Messages
2 085 972
Membres
103 073
dernier inscrit
MSCHOE16