Bonjour je n'arrive pas à appliquer une ligne personnalisé de tirettée
ci-dessous ma démarche.
j'obtiens un type de ligne tirettée par défaut et non celui que j'ai fixé.
cordialement
REM ***** BASIC *****
Option Explicit
public valeur as Object
Sub DefinirTirete()
Dim monDocument As Object, maPage As Object, maForme As Object
Dim mesTirets As New com.sun.star.drawing.LineDash
monDocument = ThisComponent
maForme = valeur
With mesTirets
.Style = com.sun.star.drawing.DashStyle.RECT
.Dots = 0 ' 0 points
.DotLen = 50 ' de 0,5 mm
.Dashes = 1 ' suivis de 1 tirets
.DashLen = 500 ' de 5 mm
.Distance = 150 ' espacés de 1,5 mm
End With
maForme.LineWidth = 1 ' 1 mm d'épaisseur
maForme.LineDash(mesTirets)
maForme.LineStyle = com.sun.star.drawing.LineStyle.DASH
maForme.lineDash.dashLen =500
End Sub
sub Main
Dim Doc As Object
Dim Charts As Object
Dim Chart as Object
Dim Rect As New com.sun.star.awt.Rectangle
Dim RangeAddress(0) As New com.sun.star.table.CellRangeAddress
Dim mesTirets As New com.sun.star.drawing.LineDash
Rect.X = 8000
Rect.Y = 1000
Rect.Width = 20000
Rect.Height = 8000
RangeAddress(0).Sheet = 1
RangeAddress(0).StartColumn = 0
RangeAddress(0).StartRow = 0
RangeAddress(0).EndColumn = 5
RangeAddress(0).EndRow = 50
Doc = ThisComponent
Charts = Doc.Sheets(1).Charts
'Charts.addNewByName("MyChart1", Rect, RangeAddress(), True, true)' ajoute un graphe
Chart = Charts.getByName("MyChart1").EmbeddedObject
Chart.Diagram = Chart.createInstance("com.sun.star.chart.Diagram")
chart.diagram.stacked = true
chart.diagram.Vertical = true 'passage horizontale du graphe
Chart.HasMainTitle = True
chart.Title.String = "diagramme 70s"
Chart.Diagram.YAxis.linecolor= RGB(0,0,0)'couleur de l'axes Y
Chart.Diagram.XAxis.linecolor= RGB(0,0,0)'couleur de l'axe X
Chart.Diagram.YAxis.Min = 0
Chart.Diagram.YAxis.Max = 65
Chart.Diagram.HasYAxisHelpGrid=true
Chart.Diagram.HasxAxisGrid=true 'affichage de la grille principal en x
'chart.diagram.Yaxis.AutoStepHelp=false 'pas necessaire
Chart.Diagram.Yaxis.StepMain=5 'intervalle des axes y principaux
Chart.Diagram.Yaxis.StepHelpCount=5 'intervalle des axes secondaires
valeur = Chart.Diagram.YHelpGrid
DefinirTirete()
Chart.Diagram.YHelpGrid.LineDash = mesTirets
Chart.Diagram.YHelpGrid.LineStyle = com.sun.star.drawing.LineStyle.DASH
Chart.Diagram.YHelpGrid.LineColor = RGB(2, 149, 248)'couleur de l'axes y secondaire
Chart.Diagram.YMainGrid.LineColor = RGB(0, 0, 0) 'couleur de l'axe y principale
Chart.Diagram.YMainGrid.LineWidth = 31 'épaisseur du traie des axes y principaux
Chart.Diagram.XMainGrid.LineColor = RGB(0, 0, 0) 'couleur de l'axe x principale
end sub
--
View this message in context:
http://nabble.documentfoundation.org/dash-and-Chart-Diagram-YHelpGrid-tp4070459.html
Sent from the Users mailing list archive at Nabble.com.
--
Envoyez un mail à users+unsubscribe@fr.libreoffice.org pour savoir comment vous désinscrire
Les archives de la liste sont disponibles à http://listarchives.libreoffice.org/fr/users/
Tous les messages envoyés sur cette liste seront archivés publiquement et ne pourront pas être
supprimés
Context
- [fr-users] dash and Chart.Diagram.YHelpGrid · lionel.maillet125
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.