When I print the graph, everything prints ok except the Legend. It shows the style of line, but then prints C1, C2... instead of the text it shows on the screen, .Item(1).LegendText = "Flow Data" for example.
Why?
Here's the print routine:
Private Sub CmdPrint_Click()
' Copy bitmap to clipboard
Form1.MSChart1.EditCopy
Printer.Orientation = vbPRORLandscape
MsgBox "Press OK to Print", vbExclamation, "PRINT GRAPH"
Printer.Print " "
' copy bitmap from clipboard
Printer.PaintPicture Clipboard.GetData(), 0, 0
Printer.EndDoc
End Sub
Here's where I have the legend text and pen style.
With .SeriesCollection
.Item(1).LegendText = "Flow Data"
.Item(2).LegendText = "#1 Low Limit"
.Item(3).LegendText = "#1 High Limit"
.Item(4).LegendText = "#2 Low Limit"
.Item(5).LegendText = "#2 High Limit"
.Item(6).LegendText = "#3 Low Limit"
.Item(7).LegendText = "#3 HighLimit"
.Item(2).Pen.Style = VtPenStyleDitted
.Item(4).Pen.Style = VtPenStyleDitted
.Item(5).Pen.Style = VtPenStyleDashed
.Item(6).Pen.Style = VtPenStyleDitted
.Item(7).Pen.Style = VtPenStyleDashed
Thanks,
Gary
Why?
Here's the print routine:
Private Sub CmdPrint_Click()
' Copy bitmap to clipboard
Form1.MSChart1.EditCopy
Printer.Orientation = vbPRORLandscape
MsgBox "Press OK to Print", vbExclamation, "PRINT GRAPH"
Printer.Print " "
' copy bitmap from clipboard
Printer.PaintPicture Clipboard.GetData(), 0, 0
Printer.EndDoc
End Sub
Here's where I have the legend text and pen style.
With .SeriesCollection
.Item(1).LegendText = "Flow Data"
.Item(2).LegendText = "#1 Low Limit"
.Item(3).LegendText = "#1 High Limit"
.Item(4).LegendText = "#2 Low Limit"
.Item(5).LegendText = "#2 High Limit"
.Item(6).LegendText = "#3 Low Limit"
.Item(7).LegendText = "#3 HighLimit"
.Item(2).Pen.Style = VtPenStyleDitted
.Item(4).Pen.Style = VtPenStyleDitted
.Item(5).Pen.Style = VtPenStyleDashed
.Item(6).Pen.Style = VtPenStyleDitted
.Item(7).Pen.Style = VtPenStyleDashed
Thanks,
Gary