Rebonjour à tous.
Voici mon deuxieme probleme.
Situation : j'ai une feuille ou se cotoient une dizaine de graphiques.
J'ai en l'occurrence une série de données sur laquelle vont se créer 2 graphiques.
Voici le code de la création du graphique, un peu retouché :
Le problème est qu'une fois mon graphique créé, il ne me prend pas du tout en données ce que j'ai demandé.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 'Création des graphiques barres Charts.Add ActiveChart.ChartType = xlColumnClustered ActiveChart.SetSourceData Source:=Sheets("Eq. Info" & t).Range("A1:G1,A5:G5"), _ PlotBy:=xlRows ActiveChart.Location Where:=xlLocationAsObject, Name:="Eq. Info" & t With ActiveChart .HasTitle = True .ChartTitle.Characters.Text = "Jours passés sur le HP / Nb jours travaillés - Trimestre " & t .Axes(xlCategory, xlPrimary).HasTitle = False .Axes(xlValue, xlPrimary).HasTitle = False .Parent.Name = "barre_eqinfo1" & t .HasLegend = False .ApplyDataLabels Type:=xlDataLabelsShowValue, LegendKey:=False .ChartArea.Border.Weight = 2 .ChartArea.Border.LineStyle = -1 .ChartArea.Interior.ColorIndex = 36 .PlotArea.Border.Weight = xlThin .PlotArea.Border.LineStyle = xlNone .PlotArea.Interior.ColorIndex = 36 .PlotArea.Interior.PatternColorIndex = 1 .PlotArea.Interior.Pattern = xlSolid End With With ActiveSheet.Shapes("barre_eqinfo1" & t) .Left = Range("A7").Left .Top = Range("A7").Top End With
Voilà ce que j'ai :
Il me prend apparemment 3 séries n'importe comment.
J'ai retourné le problème dans tous les sens et j'avoue que je commence à caler. Qqun a une idée?
Bonne journée
Partager