I have cross-platform code (below) that adds my Xojo Chart to a PDFDocument. This works for Desktop and iOS, but it seems PDFDocument.AddChart(…) is missing on Web.
How can I add a WebChart to a PDFDocument?
#If TargetDesktop Then
If CommonExportPopoverValues.myChartXojo IsA DesktopChart Then
tempPDFDocument.AddChart(DesktopChart(CommonExportPopoverValues.myChartXojo), HeaderLineStartPointX, HeaderLineStartPointY, g.Width - (LeftRightBottomMargin * 2), g.Height - HeaderLineStartPointY - (g.Height - FooterLineStartPointY))
End If
#ElseIf TargetWeb Then 'error with PDFDocument.AddChart()
If CommonExportPopoverValues.myChartXojo IsA WebChart Then
tempPDFDocument.AddChart(WebChart(CommonExportPopoverValues.myChartXojo), HeaderLineStartPointX, HeaderLineStartPointY, g.Width - (LeftRightBottomMargin * 2), g.Height - HeaderLineStartPointY - (g.Height - FooterLineStartPointY))
End If
#ElseIf TargetiOS Then
If CommonExportPopoverValues.myChartXojo IsA MobileChart Then
tempPDFDocument.AddChart(MobileChart(CommonExportPopoverValues.myChartXojo), HeaderLineStartPointX, HeaderLineStartPointY, g.Width - (LeftRightBottomMargin * 2), g.Height - HeaderLineStartPointY - (g.Height - FooterLineStartPointY))
End If
#EndIf