Quick StartThe ReportMagic MenuSchedulesBatch JobsReport StudioFilesProfileAdminAccount DetailsMeraki WebHooksGetting StartedAbout ReportMagicRegistering and Logging InSearching ReportMagicConnections and AgentsWriting ReportsStarting Out With Report StudioCreating Report TemplatesRMScriptMacro ShorthandReporting on Different Periods of TimeSetting Macro Parameter DefaultsStoring Input and Output FilesReport VariablesUsing Variable ParametersSpecifying How Graphs LookStep-by-Step LogicMonitor Graph ExamplesStep-by-Step Jira Graph ExamplesSpecifying How Tables LookChanging Fonts and ColorsUsing Macros in PowerPoint TemplatesRestricted MacrosGenerating Reports Using SchedulesUsing HTML Forms in SchedulesSeeing How Reports RanViewing ReportsCached ValuesUsing AggregationsAdvanced Report StudioAPI AccessREST APIREST API - FilesAdvancedRole-Based Access Control (RBAC)SecurityMiscellaneousBadgesCertificationsTips, Tricks and Shortcut KeysMacrosAgentAgent.ConnectionAgent.ExecuteAgent.MonitorMagicNodeListAgent.MonitorMagicNodeMeasurementListAgent.MonitorMagicNodeMeasurementSummaryAgent.MonitorMagicNodePropertyListAgent.MonitorMagicNodeTypeListAgent.PropertyAgent.SqlAnalysisAgent.SqlGraphAgent.SqlListAgent.SqlTableAgent.SqlValueAgent.SqlValuesAgent.WebQueryAlertMagicAlertMagic.MetricsGraphAlertMagic.MetricsListAutoTaskAutoTask.AccountListAutoTask.AccountPropertyAutoTask.ConnectionAutoTask.CountAutoTask.FieldListAutoTask.FieldPropertyAutoTask.ListAutoTask.PropertyAutoTask.SummaryValueAutoTask.TicketListAutoTask.TicketPropertyAzureAzure.ConnectionAzure.LogAnalyticsGraphAzure.LogAnalyticsQueryAzure.LogAnalyticsScalarAzure.LogAnalyticsTableAzure.ResourceGroupListAzure.ResourceListAzure.ResourcePropertiesAzure.SentinelAlertRuleListAzure.SentinelConnectorListAzure.SentinelIncidentListAzure.SentinelThreatIndicatorListAzure.SentinelThreatIndicatorMetricListAzure.SubscriptionListBloggerBlogger.BlogPropertyBlogger.ConnectionBlogger.PageBlogger.PageListBlogger.PagePropertyBlogger.PostBlogger.PostListBlogger.PostPropertyCacheCache.ExpiresCache.GetCache.IsSetCache.SetCache.UnsetCertifyCertify.ConnectionCertify.DepartmentListCertify.DepartmentPropertyCherwellCherwell.BusinessObjectDefinitionListCherwell.BusinessObjectListCherwell.BusinessObjectSchemaCherwell.BusinessObjectSummaryCherwell.ConnectionCiscoCisco.ConnectionCisco.FirmwareVersionPropertyCisco.SecurityAdvisoryListCisco.SerialNumberPropertyCisco.SoftwareSuggestionListCiscoDnaCenterCiscoDnaCenter.ConnectionCiscoDnaCenter.SiteListCiscoDnaCenter.SitePropertyCloudHealthCloudHealth.AssetDetailsCloudHealth.AssetListCloudHealth.AvailableReportDimensionsCloudHealth.AvailableReportOptionsCloudHealth.AvailableReportsListCloudHealth.AwsAccountDetailsCloudHealth.AwsAccountsListCloudHealth.ConnectionCloudHealth.CustomerDetailsCloudHealth.CustomerListCloudHealth.CustomerReportDetailsCloudHealth.CustomerStatementDetailsCloudHealth.OrganisationAccountsListCloudHealth.OrganisationListCloudHealth.QueryConnectWiseManageConnectWiseManage.ConnectionConnectWiseManage.CountConnectWiseManage.DictionaryConnectWiseManage.ListConnectWiseManage.PropertyCoreArrayArray.CountBreakBreakpointCalculateColorCommentContinueConvertDeleteDeleteRowDocumentBookmarkDocumentBreakDocumentInsertSectionDocumentSectionEmailEmailFileEmailReportExecuteForEachFormatTableCellFormatTableRowIfIgnoreIncInsertTableCellImageIsSetLinearRegressionLinkMapObjectRandomRegexRepeatRowSearchAndReplaceSectionSettingsSleepStopStopwatchStringStringIndexSubstringSwitchThrowExceptionUnsetWarningDatabaseDatabase.ConnectionDatabase.GraphDatabase.ListDatabase.TableDatabase.ValueDatabase.ValuesDataMagicDataMagic.SyncDictionaryDictionary.ItemDictionary.KeysDictionary.ValuesDocumentDocument.SetPropertiesFileFile.CopyFile.CopyOutputFilesFile.Csv.CellFile.Csv.RowFile.Csv.RowCountFile.Csv.TableFile.EmbedFile.ExecuteFile.ExistsFile.ImageFile.InsertFile.ListFile.LoadListFile.LoadObjectFile.LoadStringFile.LoadVariablesFile.Xlsx.CellFile.Xlsx.RowFile.Xlsx.RowCountFile.Xlsx.TableFunctionFunction.CallFunction.DefineGoogleGoogle.ConnectionGoogle.TableGraphGraph.AddDataGraph.DeleteDataGraph.RenameDataGraph.UpdateGravatarGravatar.ImageHighlightHighlight.BearerSummaryHighlight.BroadbandSummaryHighlight.CellularSummaryHighlight.ConnectionHighlight.FolderListHighlight.HttpServerPerformanceSummaryHighlight.IcmpTcpUdpPerformanceSummaryHighlight.MosPerformanceSummaryHighlight.PrecisionPerformanceSummaryHighlight.TunnelSummaryHighlight.WatchNodeListHighlight.WirelessAccessPointSummaryHubSpotHubSpot.ListJarrayJarray.TableJiraJira.AttachmentImageJira.AttachmentListJira.AttachmentPropertyJira.ConnectionJira.GraphJira.InsertMarkupJira.IssueAnalysisJira.IssueCommentListJira.IssueCommentPropertyJira.IssueLastCommentPropertyJira.IssueListJira.IssuePropertyJira.IssueResponseTimeJira.LastImageJira.StatusListJira.TableJira.TimeInStateJira.UserListJira.UserPropertyJsonJson.ItemJson.ListKrokiKroki.ImageListList.AddList.AnalysisList.ComplementList.CountList.DequeueList.DuplicatesList.FirstList.GraphList.GroupByList.IndicesOfList.IntersectionList.ItemList.RangeList.SelectList.SelectColumnsList.SortList.SummaryValueList.TableList.UnionList.WhereLogicMonitorLogicMonitor.AccountPropertyLogicMonitor.AlertAnalysisLogicMonitor.AlertCalendarLogicMonitor.AlertCountLogicMonitor.AlertListLogicMonitor.AlertMapLogicMonitor.AlertPropertyLogicMonitor.AlertRuleListLogicMonitor.AlertRulePropertyLogicMonitor.AlertStatusLogicMonitor.AlertTableLogicMonitor.AppliesToFunctionListLogicMonitor.AppliesToFunctionPropertyLogicMonitor.AppliesToListLogicMonitor.AuditEventAnalysisLogicMonitor.BigNumberWidgetValuesLogicMonitor.ClearCacheLogicMonitor.CollectorExecuteLogicMonitor.CollectorGroupListLogicMonitor.CollectorGroupPropertyLogicMonitor.CollectorListLogicMonitor.CollectorPropertyLogicMonitor.CollectorVersionListLogicMonitor.CollectorVersionPropertyLogicMonitor.ConfigCheckListLogicMonitor.ConfigCheckPropertyLogicMonitor.ConfigSourceGroupListLogicMonitor.ConfigSourceListLogicMonitor.ConfigSourcePropertyLogicMonitor.ConfigSourceXmlLogicMonitor.ConnectionLogicMonitor.ConnectionApiTokenLogicMonitor.ConvertToLiveWidgetLogicMonitor.DashboardLogicMonitor.DashboardGroupListLogicMonitor.DashboardGroupPropertyLogicMonitor.DashboardListLogicMonitor.DashboardPropertyLogicMonitor.DashboardWidgetListLogicMonitor.DatamartSyncLogicMonitor.DataPointListLogicMonitor.DataPointPropertyLogicMonitor.DataSourceGraphListLogicMonitor.DataSourceGraphPropertyLogicMonitor.DataSourceGroupListLogicMonitor.DataSourceListLogicMonitor.DataSourcePropertyLogicMonitor.DataSourceXmlLogicMonitor.DeviceConfigSourceFileLogicMonitor.DeviceConfigSourceInstanceListLogicMonitor.DeviceConfigSourceListLogicMonitor.DeviceConfigSourcePropertyLogicMonitor.DeviceCountLogicMonitor.DeviceDataSourceListLogicMonitor.DeviceDataSourcePropertyLogicMonitor.DeviceGroupListLogicMonitor.DeviceGroupPropertyLogicMonitor.DeviceListLogicMonitor.DevicePropertyLogicMonitor.DeviceSlaWidgetPropertyLogicMonitor.DeviceTableLogicMonitor.EscalationChainDestinationListLogicMonitor.EscalationChainDestinationPropertyLogicMonitor.EscalationChainListLogicMonitor.EscalationChainPropertyLogicMonitor.EventSourceFilterListLogicMonitor.EventSourceFilterPropertyLogicMonitor.EventSourceGroupListLogicMonitor.EventSourceListLogicMonitor.EventSourcePropertyLogicMonitor.EventSourceXmlLogicMonitor.FinancialInformationLogicMonitor.ForecastLogicMonitor.GraphLogicMonitor.HistoricSdtListLogicMonitor.ImageLogicMonitor.InstanceAnalysisLogicMonitor.InstanceCountLogicMonitor.InstanceDetailsTableLogicMonitor.InstanceGroupCountLogicMonitor.InstanceGroupListLogicMonitor.InstanceListLogicMonitor.InstancePropertyLogicMonitor.IntegrationListLogicMonitor.IntegrationPropertyLogicMonitor.JobMonitorListLogicMonitor.JobMonitorPropertyLogicMonitor.LastMeasurementLogicMonitor.LogAnalysisLogicMonitor.LogicModuleMetadataPropertyLogicMonitor.LogicModuleUpdateListLogicMonitor.LogicModuleUpdatePropertyLogicMonitor.LogItemListLogicMonitor.NetscanGroupListLogicMonitor.NetscanGroupPropertyLogicMonitor.NetscanListLogicMonitor.NetscanPropertyLogicMonitor.NewUserMessagePropertyLogicMonitor.PaymentInformationLogicMonitor.PercentageAvailabilityLogicMonitor.PortalVersionLogicMonitor.PropertySourceGroupListLogicMonitor.PropertySourceJsonLogicMonitor.PropertySourceListLogicMonitor.PropertySourcePropertyLogicMonitor.QueryLogicMonitor.RecipientGroupListLogicMonitor.RecipientGroupPropertyLogicMonitor.RecycleBinItemListLogicMonitor.RecycleBinItemPropertyLogicMonitor.ReportGroupListLogicMonitor.ReportGroupPropertyLogicMonitor.ReportListLogicMonitor.ReportPropertyLogicMonitor.ResourceAnalysisLogicMonitor.ResourceGroupAnalysisLogicMonitor.RoleListLogicMonitor.RolePropertyLogicMonitor.SdtListLogicMonitor.SdtPercentageLogicMonitor.SdtPropertyLogicMonitor.SingleSignOnPropertyLogicMonitor.SlaWidgetValuesLogicMonitor.SnmpSysOidMapListLogicMonitor.SnmpSysOidMapPropertyLogicMonitor.SummaryValueLogicMonitor.SummaryValueListLogicMonitor.ThresholdLogicMonitor.TrafficTableLogicMonitor.UnmonitoredDeviceListLogicMonitor.UnmonitoredDevicePropertyLogicMonitor.UserApiTokenListLogicMonitor.UserApiTokenPropertyLogicMonitor.UserListLogicMonitor.UserPropertyLogicMonitor.WebsiteCheckpointDataListLogicMonitor.WebsiteCountLogicMonitor.WebsiteGroupAnalysisLogicMonitor.WebsiteGroupCountLogicMonitor.WebsiteGroupListLogicMonitor.WebsiteGroupPropertyLogicMonitor.WebsiteListLogicMonitor.WebsitePropertyLogicMonitor.WidgetStatusMagicSuiteMagicSuite.SubscriptionListMerakiMeraki.CameraImageMeraki.ConfigurationChangeListMeraki.ConnectionMeraki.DevicePropertyMeraki.DeviceUplinkPropertyMeraki.EndOfLifeMeraki.NetworkClientListMeraki.NetworkDeviceListMeraki.NetworkEventListMeraki.NetworkListMeraki.NetworkPropertyMeraki.NetworkSwitchPortsListMeraki.NetworkSwitchStackListMeraki.OrganizationDeviceLicenseListMeraki.OrganizationDeviceLicensePropertyMeraki.OrganizationDeviceListMeraki.OrganizationDeviceListStatusPropertyMeraki.OrganizationInventoryListMeraki.OrganizationLicenseStatePropertyMeraki.OrganizationListMeraki.OrganizationPropertyMeraki.OrganizationUplinkUsageMeraki.WirelessNetworkClientConnectionStatsPropertyMeraki.WirelessNetworkClientLatencyListMeraki.WirelessNetworkClientsConnectionStatsListMeraki.WirelessNetworkClientsLatencyListMeraki.WirelessNetworkConnectionStatsPropertyMeraki.WirelessNetworkDeviceConnectionStatsPropertyMeraki.WirelessNetworkDeviceLatencyListMeraki.WirelessNetworkDevicesConnectionStatsListMeraki.WirelessNetworkDevicesLatencyListMeraki.WirelessNetworkLatencyListMicrosoftDataverseMicrosoftDataverse.ConnectionMicrosoftDataverse.CountMicrosoftDataverse.EntityDefinitionsListMicrosoftDataverse.EntityListMicrosoftDataverse.EntityPropertyListMicrosoftDataverse.ListMicrosoftDataverse.PropertyMicrosoftGraphMicrosoftGraph.ConnectionMicrosoftGraph.MicrosoftDataverseConnectionMicrosoftGraph.QueryObjectObject.ArrayCountObject.PropertyObject.TypeObject.UnpackObject.UnpackVariablesOpenAiOpenAi.AnswerOpenAi.CompleteOpenAi.ConnectionOpenAi.ImageQuickBooksQuickBooks.ConnectionQuickBooks.PropertyReportMagicReportMagic.ApplyBrandReportMagic.BadgeListReportMagic.ConnectionListReportMagic.ConnectionPropertyReportMagic.ConnectionStatusPropertyReportMagic.FeedbackListReportMagic.FeedbackPropertyReportMagic.MacroGroupListReportMagic.MacroHelpReportMagic.MacroListReportMagic.ReportBatchJobCountReportMagic.ReportBatchJobListReportMagic.ReportBatchJobPropertyReportMagic.ReportConnectionSummaryReportMagic.ReportJobCountReportMagic.ReportJobListReportMagic.ReportJobPropertyReportMagic.ReportMacroCountReportMagic.ReportPropertyReportMagic.ReportScheduleCountReportMagic.ReportScheduleListReportMagic.ReportSchedulePropertyReportMagic.SetReportPropertyReportMagic.SystemPropertyReportMagic.TenantImageReportMagic.TopicHelpReportMagic.VersionSalesforceSalesforce.ConnectionSalesforce.ListSalesforce.PropertyServiceNowServiceNow.ConnectionServiceNow.CountServiceNow.CreateServiceNow.DeleteServiceNow.DictionaryServiceNow.ListServiceNow.PropertyServiceNow.UpdateShapeShape.AddShape.CloneShape.DeleteShape.FormatShape.HideShape.SetPropertyShape.SetTextSlackSlack.ConnectionSlack.MessageSlideSlide.DeleteSlide.DeleteSectionSlide.LinkSlide.MoveToSlide.RepeatSmtpSmtp.ConnectionSnmpSnmp.EnterprisePropertySolarWindsSolarWinds.ConnectionSolarWinds.SqlListSolarWinds.SqlTableSqlSql.AnalysisTableTable.ColumnCountTable.DeleteTable.FormatTable.GraphTable.MergeCellsTable.RowCountTable.SaveTable.SortTable.WorldMapTimeCalendarCronHumanReadableCronRunDateDateRangeDateTimeDateTime.IsInWorkHoursDateTime.WorkHoursDurationTimeSpanTogglToggl.ClientListToggl.ClientPropertyToggl.ConnectionToggl.ProjectListToggl.ProjectPropertyToggl.ProjectReportPropertyToggl.TimeEntryListToggl.TimeEntryPropertyToggl.UserListToggl.UserPropertyToggl.WorkspaceListToggl.WorkspacePropertyTwilioTwilio.ConnectionTwilio.SmsUkParliamentUkParliament.PetitionCountUkParliament.PetitionListUkParliament.PetitionPropertyVariableVariable.ImageVariable.ListVariable.PropertyWebWeb.ConnectionWeb.HtmlWeb.ImageWeb.QueryWeb.ScreenshotWeb.TableWeb.TextXlsxXlsx.AddAnalysisXlsx.EmbedZendeskZendesk.ConnectionZendesk.ListZendesk.PropertyZoho.DeskZoho.Desk.ZohoListZoho.Desk.ZohoProperty

[Agent.SqlGraph:]

Retrieve SQL data and display in chart form in a report.

This macro is partially execute-restricted. Details in the Usage / Parameters section. See Connection Role Security and / or Restricted Macros.


Purpose

Retrieve SQL data and display in chart form in a report. The query is executed via an Agent Connection.


Macro Compatibility

The macro can be used in all input document types and in Report Studio.


Usage

The first column returned will be used as the X-Axis, following columns are values to graph and will represent one or more series on the Y-Axis and should be numeric; nulls are treated as gaps in the data. Queries that contains the following commands (case-insensitive) are execute-restricted - in this case ask your Tenant Admin to make the Schedule admin-locked, and ensure an Admin has made the Connection accessible to you. The restricted commands are: ADD, ALTER, APPEND, BACKUP, CREATE, DELETE, DROP, EXEC, INSERT, TRUNCATE, and UPDATE.


Parameter TypeDeprecation Message Preferred ParameterPresence Purpose Options Default
connectionString
StringMandatory The SQL connection string (an SQL endpoint). N/A N/A
sql
StringMandatory The SQL to execute. Queries that contains the following commands (case-insensitive) are execute-restricted - in this case ask your Tenant Admin to make the Schedule admin-locked, and ensure an Admin has made the Connection accessible to you. The restricted commands are: ADD, ALTER, APPEND, BACKUP, CREATE, DELETE, DROP, EXEC, INSERT, TRUNCATE, and UPDATE. N/A N/A
chartType
List<String>DeprecatedchartTypes The type(s) of chart. You can specify more than one (separated by a semi-colon). If you specify fewer than the number of series, the last value will continue to be used for the remainder of the series. Permitted values: Point, FastPoint, Line, Spline, StepLine, FastLine, Bar, StackedBar, StackedBar100, Column, StackedColumn, StackedColumn100, Area, SplineArea, StackedArea, StackedArea100, Pie, Doughnut, Radar, Polar, BoxPlot, Funnel, Pyramid. For Pie and Doughnut chart types, the first column provides the slice name, the second column the slice size and all other columns are ignored. N/A N/A
chartTypes
List<String>

Use instead of:

  • chartType
Conditional The type(s) of chart. You can specify more than one (separated by a semi-colon). If you specify fewer than the number of series, the last value will continue to be used for the remainder of the series. Permitted values: Point, FastPoint, Line, Spline, StepLine, FastLine, Bar, StackedBar, StackedBar100, Column, StackedColumn, StackedColumn100, Area, SplineArea, StackedArea, StackedArea100, Pie, Doughnut, Radar, Polar, BoxPlot, Funnel, Pyramid. For Pie and Doughnut chart types, the first column provides the slice name, the second column the slice size and all other columns are ignored. N/A N/A
customPaletteHexCodes
StringConditional When the 'overridePaletteType' parameter is set to 'Custom', you must specify a semi-colon separated list of HTML-style hex codes (or HTML colour names such as red), e.g. #FF0000;#00FF00;#0000FF (with or without the hash) to use as a custom override palette, which will apply to each line series plotted. This parameter is ignored unless you use 'overridePaletteType=Custom'. N/A N/A
imageHeightCm
DoubleConditional The image height in centimetres (cm). If this is set, so should 'imageWidthCm' be. For Word output, this is equivalent to setting an absolute height in cm without locking the aspect ratio. N/A N/A
imageWidthCm
DoubleConditional The image width in centimetres. If this is set, so should 'imageHeightCm' be. For Word output, this is equivalent to setting an absolute with in cm without locking the aspect ratio. N/A N/A
xAxisLabel
StringDeprecatedxAxisTitle Set the X Axis Label to the provided text. Required for all chartTypes, except 'Pie' and 'Doughnut'. N/A N/A
xAxisTitle
String

Use instead of:

  • xAxisLabel
Conditional Set the X Axis Label to the provided text. Required for all chartTypes, except 'Pie' and 'Doughnut'. N/A N/A
yAxisLabel
StringDeprecatedyAxisTitle Set the Y Axis Label to the provided text. Required for all chartTypes, except 'Pie' and 'Doughnut'. N/A N/A
yAxisTitle
String

Use instead of:

  • yAxisLabel
Conditional Set the Y Axis Label to the provided text. Required for all chartTypes, except 'Pie' and 'Doughnut'. N/A N/A
autoScaleYAxisLabels
Boolean

Use instead of:

  • useYAxisShortLabels
Optional Whether to use short (auto-scaled) labels in Y-axes (e.g. 10K instead of 10000). Only has an effect when the 'yAxisLabelFormat' parameter is NOT set.
  • true
  • false
true
autoScaleYAxisLabelsAreData
BooleanOptional Whether the short (auto-scaled) labels in Y-axes represent 'data'. In that case these labels are used: B, KB, MB, GB, and TB. When not representing data, the labels used are: K (thousands), M (millions), B (billions), and T (trillions). Only has an effect when 'autoScaleYAxisLabels' is true (the default for that parameter), otherwise ignored.
  • true
  • false
false
chartAreaBackgroundColor
ColorOptional The chart area background color N/A
chartAreaHeightPercent
Int32Optional The ChartAreaHeightPercent
  • From 0 to 100
100
chartAreaWidthPercent
Int32Optional The ChartAreaWidthPercent
  • From 0 to 100
80
chartAreaXPosition
Int32Optional The ChartAreaXPosition
  • From 0 to 100
0
chartAreaYPosition
Int32Optional The ChartAreaYPosition
  • From 0 to 100
0
chartBackgroundColor
ColorOptional The chart background color N/A
chartBorderLineColor
ColorOptional The chart border line color Color [Black]
chartBorderLineDashStyle
ChartDashStyleOptional The chart border line dash style
  • Solid
  • NotSet
  • Dash
  • DashDot
  • DashDotDot
  • Dot
Solid
chartBorderLineWidth
Int32Optional The chart border line width N/A 0
chartHeight
Int32Optional The chart height in pixels
  • From 1 to 8000
400
chartImageFormat
ChartImageFormatOptional The chart image format
  • EmfPlus
  • Jpeg
  • Png
  • Bmp
  • Tiff
  • Gif
  • Emf
  • EmfDual
EmfPlus
chartWidth
Int32Optional The chart width in pixels
  • From 1 to 8000
2560
clipBottom
DoubleOptional The number of pixels to clip from the bottom of the image. In PowerPoint, you must manually set the 'chartImageFormat' parameter to either Png or Jpeg, e.g. chartImageFormat=Png N/A N/A
clipLeft
DoubleOptional The number of pixels to clip from the left of the image. In PowerPoint, you must manually set the 'chartImageFormat' parameter to either Png or Jpeg, e.g. chartImageFormat=Png N/A N/A
clipRight
DoubleOptional The number of pixels to clip from the right of the image. In PowerPoint, you must manually set the 'chartImageFormat' parameter to either Png or Jpeg, e.g. chartImageFormat=Png N/A N/A
clipTop
DoubleOptional The number of pixels to clip from the top of the image. In PowerPoint, you must manually set the 'chartImageFormat' parameter to either Png or Jpeg, e.g. chartImageFormat=Png N/A N/A
comment
StringOptional Add a comment to make your document template more readable. The comment is discarded in the output document. N/A N/A
connectionName
StringOptional The name of the Connection. N/A N/A
description
StringOptional The description. N/A N/A
doughnutRadius
Int32Optional Optionally use to specify the doughnut radius when specifying 'chartType=Doughnut'.
  • From 0 to 99
60
dynamicYAxis
BooleanOptional Whether to more closely show the y-axis variance on charts. Use the 'dynamicYAxisVariancePercent' parameter to control the variance percentage. When set, the 'yAxisMinimum' and 'yAxisMaximum' parameters are ignored. When this parameter is set, the 'yAxisIsLogarithmic' parameter is ignored.Note: when the minimum data value is 0, the y-axis minimum is NOT adjusted.
  • true
  • false
false
dynamicYAxisVariancePercent
DoubleOptional The variance percentage to use in conjunction with the 'dynamicYAxis' parameter to adjust the y-axis scale. For example, if the maximum y-axis data value was 10 and this parameter was set to 5, then the y-axis maximum is set to 10 + (5% of 10), which is 10.5. When this parameter and 'dynamicYAxis' is set, the 'yAxisMinimum' and 'yAxisMaximum' parameters are ignored.When this parameter and 'dynamicYAxis' is set, the 'yAxisIsLogarithmic' parameter is ignored. NOTE: final y-axis minimum and maximum values will be rounded to the nearest integer (whole number)
  • From 0 to 100
1.5
emptyTableText
StringOptional The text for the new tab in the Xlsx document if the table is empty. N/A N/A
enable3d
BooleanOptional Whether to enable 3D.
  • true
  • false
false
ensureColorsUnique
BooleanOptional Whether to ensure the colours of all series in the chart are unique. Note that unique colours are still selected if no palette is provided for any series.
  • true
  • false
false
errorOnOverflow
BooleanOptional Should NCalc expression evaluation throw error on Overflow
  • true
  • false
true
failureText
StringOptional The text to display should the macro fail to execute. Note that a poorly-specified macro (e.g. omitting mandatory parameters) will still result in an error message. N/A N/A
fixedLines
List<FixedLine>Optional The semicolon-delimited list of lines of fixed y-value to add to the graph. Each should be in the format "name^value^color", e.g. fixedLines=Lower95th^10^Red;Mean^50^Blue;Upper95th^90^Red N/A N/A
hAlign
PowerPointImageHorizontalAlignOptional For PowerPoint output only, the ability to horizontally align images produced by macros, with vertical lines. No other image parameters apply (clipping, etc.).
  • Center
  • Left
  • Right
N/A
horizontalPositionAlignment
HorizontalPositionAlignmentOptional The horizontal position alignment.
  • Left
  • Inline
  • Center
  • Right
  • Inside
  • Outside
Left
horizontalPositionRelativeTo
HorizontalPositionRelativeToOptional What the horizontal position is relative to.
  • Inline
  • Margin
  • Column
  • Page
  • InsideMargin
  • OutsideMargin
  • LeftMargin
  • RightMargin
Inline
if
StringOptional The condition that must be true in order for the macro to be executed/evaluated. Must either evaluate to true or false, for example: "3+5=8" or "contains('abcd', 'z'). N/A true
inclination3dDegrees
Int32Optional The inclination in degrees. Only valid when enable3d is set to true.
  • From -90 to 90
50
innerPlotHeightPercent
Int32Optional The InnerPlotHeightPercent
  • From 0 to 100
75
innerPlotWidthPercent
Int32Optional The InnerPlotWidthPercent
  • From 0 to 100
85
innerPlotXPosition
Int32Optional The InnerPlotXPosition
  • From 0 to 100
10
innerPlotYPosition
Int32Optional The InnerPlotYPosition
  • From 0 to 100
10
labelBackgroundColor
ColorOptional The label background color N/A
labelColor
ColorOptional The label color N/A
labelFontSize
DoubleOptional Set the chart label font size.
  • From 5 to 100
16
labels
List<String>Optional Optionally use to specify labels to add to the chart, formatted as: text^X^Y^alignment^font^fontSize^fontStyle^fontColor. Supported fonts are: 'Arial, Calibri, Comic Sans MS, and Ms Sans Serif'. Supported fontStyles are 'Regular, Bold, Italic, Underline, Strikeout'. Supported alignments are TopLeft, TopCenter, TopRight, MiddleLeft, MiddleCenter, MiddleRight, BottomLeft, BottomCenter, BottomRight. Font colours can be named fonts (such as Red) or hex-based colours (ARGB or RGB-formatted such as #FF0000 or #FFFF0000 for red). Note that alpha component is optional. N/A N/A
labelText
StringOptional Optionally use to specify the label text. Options include #PERCENT{P0} (e.g. for Pie/doughnut charts), #VALX and #VALY. The {P-number} specifies the number of decimal places to display. You can combine these and other symbols (e.g. '#VALX\n(#PERCENT %)' ). N/A N/A
legendBackgroundColor
ColorOptional The legend background color N/A
legendBorderColor
ColorOptional The legend border color N/A
legendFontSize
DoubleOptional Set the chart legend font size (default autofit).
  • From 5 to 100
20
legendHeightPercent
Int32Optional The LegendHeightPercent
  • From 0 to 100
100
legendStyle
LegendStyleOptional The legend style
  • Column
  • Row
  • Table
Column
legendText
StringOptional Optionally use to specify the label legend text. For other options, see the labelText parameter. N/A N/A
legendTextWrapThreshold
Int32Optional The number of characters that can be placed in a legend item before text wrapping occurs. Wrapping uses a 'word-break' method, so if the legend names do NOT contain spaces, no wrapping will occur.
  • From 0 to 2147483647
25
legendWidthPercent
Int32Optional The LegendWidthPercent
  • From 0 to 100
20
legendXPosition
Int32Optional The LegendXPosition
  • From 0 to 100
80
legendYPosition
Int32Optional The LegendYPosition
  • From 0 to 100
0
lineWidth
Int32Optional The line width
  • From 1 to 10
2
markerBorderColor
ListColor

Use instead of:

  • markerBorderColors
Optional Set the border color(s) of the marker (for example, on line charts). If there are fewer values provided than there are series in your graph, the last one is repeated for the remaining series. N/A N/A
markerBorderColors
ListColorDeprecatedmarkerBorderColor Set the border color(s) of the marker (for example, on line charts). If there are fewer values provided than there are series in your graph, the last one is repeated for the remaining series. N/A N/A
markerBorderWidth
List<Int32>

Use instead of:

  • markerBorderWidths
Optional Set the border width(s) of the marker (for example, on line charts). If there are fewer values provided than there are series in your graph, the last one is repeated for the remaining series. N/A N/A
markerBorderWidths
List<Int32>DeprecatedmarkerBorderWidth Set the border width(s) of the marker (for example, on line charts). If there are fewer values provided than there are series in your graph, the last one is repeated for the remaining series. N/A N/A
markerColor
ListColor

Use instead of:

  • markerColors
Optional Set the color(s) of the marker (for example, on line charts). If there are fewer values provided than there are series in your graph, the last one is repeated for the remaining series. N/A N/A
markerColors
ListColorDeprecatedmarkerColor Set the color(s) of the marker (for example, on line charts). If there are fewer values provided than there are series in your graph, the last one is repeated for the remaining series. N/A N/A
markerSize
List<Int32>

Use instead of:

  • markerSizes
Optional Set the size(s) of the marker (for example, on line charts). If there are fewer values provided than there are series in your graph, the last one is repeated for the remaining series. N/A N/A
markerSizes
List<Int32>DeprecatedmarkerSize Set the size(s) of the marker (for example, on line charts). If there are fewer values provided than there are series in your graph, the last one is repeated for the remaining series. N/A N/A
markerStyle
ListMarkerStyle

Use instead of:

  • markerStyles
Optional Set the marker style(s) (for example, on line charts) If there are fewer values provided than there are series in your graph, the last one is repeated for the remaining series. N/A N/A
markerStyles
ListMarkerStyleDeprecatedmarkerStyle Set the marker style(s) (for example, on line charts) If there are fewer values provided than there are series in your graph, the last one is repeated for the remaining series. N/A N/A
mode
MacroModeOptional The mode in which variables are stored. In the legacy mode (default for Schedules), the variable created is a string and formatted. In the normal mode (default for Report Studio), the output variable is stored as a strongly-typed object, e.g. an Int32 or a List etc., rather than a formatted string.
  • Legacy
  • Normal
Legacy
noDataText
StringOptional The text to insert, instead of a graph, when there is no data. If not set, then you may see a Macro Error instead in this case. N/A N/A
obfuscation
ObfuscationTypeOptional Obfuscation type. Use obfuscation to write reports where sensitive data is hidden. When used, ReportMagic guarantees that the same input string will map to the same output string for the whole of the report (but the next time the report runs, it will most likely map to a different value). If you use obfuscation, the property in your macro will not show up and instead, you will see a fake item of the obfuscation type chosen.
  • None
  • UkTown
  • DeviceName
  • Company
  • IpAddress
  • PrivateIpAddress
None
opacityPercent
DoubleOptional The image opacity (0 is transparent, 100 is solid).
  • From 0 to 100
100
orderAreaChartSeriesByMean
BooleanOptional For charts where all the series are areas (not stacked), order the series according to the mean y-axis values (largest first, descending). This is useful for charts where, depending on the data, 'larger' series would be rendered in front of smaller ones, thereby obscuring them in the chart.
  • true
  • false
false
overridePaletteType
OverridePaletteTypeOptional Force series colours to use various alternative palettes. Overrides all other settings such as 'EnsureColorsUnique'. When there are more series than the count of colours in each palette, the colours chosen will start again from the beginning of the palette. This parameter is useful for series where there are no colours set (or set to 'Auto' in LogicMonitor Widget graphs, for example).
  • Default
  • Custom
  • LogicMonitor
  • RainbowStandard
  • RainbowExtended
Default
pageHeightPercent
DoubleOptional The height of the page to take up with the graph. Always overrides 'imageHeightCm'
  • From 0 to 300
N/A
pageWidthPercent
DoubleOptional The width of the page to take up with the graph. Always overrides 'imageWidthCm'
  • From 0 to 300
N/A
palette
List<String>Optional A list of html-encoded (hex codes) colours for each series separated by ^ for the series name and colour, and semicolons for each series (see examples below). If not specified, a default Microsoft palette will be used. The 'OverridePaletteType' parameter will, if set, override this parameter. N/A Yes^#0d0;​No^#d00;​True^#0d0;​False^#d00;​OK^#0d0;​Error^#d00;​Unknown^#ddd
perspective3dPercent
Int32Optional The perspective in percent. Only valid when enable3d is set to true.
  • From 0 to 100
0
pieCollectedColor
ColorOptional Optionally use to specify the color of the collected ('other') pie slice. Color [LightGray]
pieCollectedLabel
StringOptional Optionally use to specify the label for the collected ('other') pie slice. N/A Other
pieCollectedThresholdPercent
DoubleOptional Optionally use to specify the percentage threshold for the collected ('other') pie slice.
  • From 0 to 100
5
pieLabelStyle
PieLabelStyleOptional Optionally use to specify the doughnut radius when specifying 'chartType=Doughnut' or 'chartType=Pie'.
  • Inside
  • Outside
  • Disabled
Inside
pieLineColor
ColorOptional Optionally use to specify the pie or doughnut line color when using 'pieLabelStyle=Outside'. Color [LightGray]
pieStartAngleDegrees
Int32Optional Optionally use to specify the pie or doughnut start angle in degrees from the top.
  • From 0 to 359
0
pointDepth3dPercent
Int32Optional The point depth as a percentage. Only valid when enable3d is set to true.
  • From 0 to 1000
100
pointGapDepth3dPercent
Int32Optional The point gap depth as a percentage. Only valid when enable3d is set to true.
  • From 0 to 1000
100
pointWidth
DoubleOptional The point width (gap between bar or column chart items) N/A N/A
removeNewlineCharacters
BooleanOptional Whether to remove newline characters from the SQL.
  • true
  • false
false
rotation3dDegrees
Int32Optional The rotation in degrees. Only valid when enable3d is set to true.
  • From -90 to 90
30
serverType
SystemAccess.ServerTypeOptional The type of server.
  • Mssql
  • None
  • Postgres
Mssql
storeAsHidden
StringOptional The hidden (does not show in document output) variable in which to save the output graph as base64-encoded text. This is useful because the [Variable.Image:] macro can then insert it into any document. The image is generated only once but can then be manipulated repeatedly with a variety of image-related parameters. Note: when this variable is set, the image format will be forced to PNG, i.e. the equivalent of: chartImageFormat=Png. The image is saved unclipped (i.e. without any clip parameters applied). N/A N/A
timeoutMs
Int32Optional The timeout in milliseconds.
  • From 1000 to 2147483647
60000
title
StringOptional The title. N/A N/A
titleHeadingLevel
Int32Optional The title heading level. Don't specify if no heading is required. N/A N/A
useChartMagic
BooleanOptional Whether to use ChartMagic (experimental)
  • true
  • false
false
useYAxisShortLabels
BooleanDeprecatedautoScaleYAxisLabels Whether to use short (auto-scaled) labels in Y-axes (e.g. 10K instead of 10000). Only has an effect when the 'yAxisLabelFormat' parameter is NOT set.
  • true
  • false
true
vAlign
PowerPointImageVerticalAlignOptional For PowerPoint output only, the ability to vertically align images produced by macros, with horizontal lines. No other image parameters apply (clipping, etc.).
  • Bottom
  • Middle
  • Top
N/A
verticalPositionAlignment
VerticalPositionAlignmentOptional The Vertical position alignment.
  • Top
  • Inline
  • Center
  • Bottom
  • Inside
  • Outside
Top
verticalPositionRelativeTo
VerticalPositionRelativeToOptional What the vertical position is relative to.
  • Inline
  • Page
  • Paragraph
  • Margin
  • BottomMargin
  • InsideMargin
  • OutsideMargin
  • TopMargin
Inline
warning
StringOptional If specified, adds a warning message for this macro. This is processed as an NCalc, and the warning message will ALWAYS be present and will be the value of the evaluated NCalc expression. N/A N/A
worksheetName
StringOptional The worksheet to save the result in the output Excel document (if so configured). Excel does not allow blank names, names above 31 characters, and the following characters: :, /, \, ?, *, [, ] N/A Table
wrapping
WrappingOptional Image wrapping.
  • Inline
  • BehindText
Inline
writeToSpreadsheet
BooleanOptional Whether to output the result in the output Excel document (if so configured).
  • true
  • false
true
xAxisFontColor
ColorOptional Optionally use to specify the x axis font color. Color [Black]
xAxisFontSize
DoubleOptional Set the chart x-axis font size (default autofit).
  • From 5 to 100
20
xAxisHeightPercent
DoubleOptional Set the chart x-axis height as a percent of the chart area. By default, an automatic choice is made.
  • From 0 to 90
N/A
xAxisInterval
DoubleOptional The x-axis interval. Only works for whole numbers such as 1, 2, etc. (unpredictable results otherwise). N/A N/A
xAxisIntervalAutoMode
IntervalAutoModeOptional Optionally use to specify the x axis's interval auto mode.
  • FixedCount
  • VariableCount
FixedCount
xAxisIntervalType
DateTimeIntervalTypeOptional Optionally use to specify the x axis's interval type. The 'xAxisInterval' parameter is ignored when this parameter is 'Auto' (the default). It is recommended that if you know the type of the date-oriented x-axis (such as months) then you set this parameter accordingly e.g. xAxisIntervalType=Months, and xAxisInterval=1 (to display each month on the x-axis).
  • Auto
  • Number
  • Years
  • Months
  • Weeks
  • Days
  • Hours
  • Minutes
  • Seconds
  • Milliseconds
  • NotSet
Auto
xAxisIsAutoFit
BooleanOptional Whether the x axis's labels are automatically fitted.
  • true
  • false
true
xAxisIsMarginVisible
BooleanOptional Overrides the default x-axis auto margin (which is true by default EXCEPT when there's an empty graph with 2 data points, e.g. a start and an end date). The auto margin extends the x-axis by the equivalent of 1 data point either side of the data, typically leaving a small gap between both interior sides of the axis and the data. Note that in the case of an EMPTY graph (no y-values, but where there is a date / data range), this can lead to an additional month each side of the axis, which may not be what you want to achieve. ReportMagic in this case AUTOMATICALLY disables the margins to produce the 'expected' x-axis range, hence why you may want to force this to true in case you do want the margins.
  • true
  • false
N/A
xAxisLabelAngle
Int32Optional Optionally use to specify the x axis's label angle.
  • From -90 to 90
0
xAxisLabelAutoFitStyle
LabelAutoFitStylesOptional Optionally use to specify the X Axis label autofit style.
  • DecreaseFont
  • None
  • IncreaseFont
  • StaggeredLabels
  • LabelsAngleStep30
  • LabelsAngleStep45
  • LabelsAngleStep90
  • WordWrap
DecreaseFont
xAxisLabelFormat
StringOptional The X Axis label format. See https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings for more details. N/A yyyy-MM-dd
xAxisLineColor
ColorOptional The x axis line color. N/A
xAxisLineDashStyle
ChartDashStyleOptional The x axis line dash style
  • Solid
  • NotSet
  • Dash
  • DashDot
  • DashDotDot
  • Dot
Solid
xAxisLineWidth
Int32Optional The x axis line width. N/A N/A
xAxisMajorGridEnabled
BooleanOptional Whether the X-axis major grid is enabled
  • true
  • false
true
xAxisMajorGridInterval
DoubleOptional A number - (if specified, you must also specify xAxisMajorGridIntervalType)
  • From 0 to 100
N/A
xAxisMajorGridIntervalType
DateTimeIntervalTypeOptional The major x-axis grid interval type.
  • Auto
  • Days
  • Hours
  • Milliseconds
  • Minutes
  • Months
  • NotSet
  • Number
  • Seconds
  • Weeks
  • Years
N/A
xAxisMinorGridEnabled
BooleanOptional Whether the X-axis Minor grid is enabled
  • true
  • false
true
xAxisMinorGridInterval
DoubleOptional A number - (if specified, you must also specify xAxisMinorGridIntervalType)
  • From 0 to 100
N/A
xAxisMinorGridIntervalType
DateTimeIntervalTypeOptional The Minor x-axis grid interval type.
  • Auto
  • Days
  • Hours
  • Milliseconds
  • Minutes
  • Months
  • NotSet
  • Number
  • Seconds
  • Weeks
  • Years
N/A
xlsxTableStyle
XlsxTableStyleOptional The XLSX table style to use in any XLSX output document.
  • TableStyleMedium13
  • None
  • TableStyleDark1
  • TableStyleDark10
  • TableStyleDark11
  • TableStyleDark2
  • TableStyleDark3
  • TableStyleDark4
  • TableStyleDark5
  • TableStyleDark6
  • TableStyleDark7
  • TableStyleDark8
  • TableStyleDark9
  • TableStyleLight1
  • TableStyleLight10
  • TableStyleLight11
  • TableStyleLight12
  • TableStyleLight13
  • TableStyleLight14
  • TableStyleLight15
  • TableStyleLight16
  • TableStyleLight17
  • TableStyleLight18
  • TableStyleLight19
  • TableStyleLight2
  • TableStyleLight20
  • TableStyleLight21
  • TableStyleLight3
  • TableStyleLight4
  • TableStyleLight5
  • TableStyleLight6
  • TableStyleLight7
  • TableStyleLight8
  • TableStyleLight9
  • TableStyleMedium1
  • TableStyleMedium10
  • TableStyleMedium11
  • TableStyleMedium12
  • TableStyleMedium14
  • TableStyleMedium15
  • TableStyleMedium16
  • TableStyleMedium17
  • TableStyleMedium18
  • TableStyleMedium19
  • TableStyleMedium2
  • TableStyleMedium20
  • TableStyleMedium21
  • TableStyleMedium22
  • TableStyleMedium23
  • TableStyleMedium24
  • TableStyleMedium25
  • TableStyleMedium26
  • TableStyleMedium27
  • TableStyleMedium28
  • TableStyleMedium3
  • TableStyleMedium4
  • TableStyleMedium5
  • TableStyleMedium6
  • TableStyleMedium7
  • TableStyleMedium8
  • TableStyleMedium9
TableStyleMedium13
xValueType
ChartValueTypeOptional The x value type. You can set this to 'String' which will disable the 'Auto' mode for the 'xAxisIntervalType' parameter.
  • DateTime
  • Auto
  • Double
  • Single
  • Int32
  • Int64
  • UInt32
  • UInt64
  • String
  • Date
  • Time
  • DateTimeOffset
DateTime
yAxisFontColor
ColorOptional Optionally use to specify the y axis font color. Color [Black]
yAxisFontSize
DoubleOptional Set the chart y-axis font size (default autofit).
  • From 5 to 100
20
yAxisInterval
DoubleOptional The y-axis interval. Only works for whole numbers such as 1, 2, etc. (unpredictable results otherwise). N/A N/A
yAxisIntervalAutoMode
IntervalAutoModeOptional Optionally use to specify the y axis's interval auto mode.
  • FixedCount
  • VariableCount
FixedCount
yAxisIntervalType
DateTimeIntervalTypeOptional Optionally use to specify the y axis's interval type.
  • Auto
  • Number
  • Years
  • Months
  • Weeks
  • Days
  • Hours
  • Minutes
  • Seconds
  • Milliseconds
  • NotSet
Auto
yAxisIsAutoFit
BooleanOptional Whether the y axis's labels are automatically fitted.
  • true
  • false
true
yAxisIsLogarithmic
BooleanOptional Optionally use to specify that the Y Axis is logarithmic. Note that any y values of 0 or below will cause an error. You may need to manually adjust the yAxisMinimum parameter. When the 'dynamicYAxis' parameter is set, this parameter is ignored and the axis is forced NOT to be logarithmic.
  • true
  • false
false
yAxisLabelAngle
Int32Optional Optionally use to specify the y axis's label angle.
  • From -90 to 90
0
yAxisLabelAutoFitStyle
LabelAutoFitStylesOptional Optionally use to specify the Y Axis label autofit style.
  • DecreaseFont
  • None
  • IncreaseFont
  • StaggeredLabels
  • LabelsAngleStep30
  • LabelsAngleStep45
  • LabelsAngleStep90
  • WordWrap
DecreaseFont
yAxisLabelFormat
StringOptional The Y Axis label format. See https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings for more details. When this parameter is set, it overrides the 'autoScaleYAxisLabels' parameter (i.e. that one has no effect). N/A N/A
yAxisLineColor
ColorOptional The y axis line color. N/A
yAxisLineDashStyle
ChartDashStyleOptional The y axis line dash style
  • Solid
  • NotSet
  • Dash
  • DashDot
  • DashDotDot
  • Dot
Solid
yAxisLineWidth
Int32Optional The y axis line width. N/A N/A
yAxisMajorGridEnabled
BooleanOptional Whether the Y-axis major grid is enabled
  • true
  • false
true
yAxisMajorGridInterval
DoubleOptional A number - (if specified, you must also specify yAxisMajorGridIntervalType)
  • From 0 to 100
N/A
yAxisMajorGridIntervalType
DateTimeIntervalTypeOptional The major y-axis grid interval type.
  • Auto
  • Days
  • Hours
  • Milliseconds
  • Minutes
  • Months
  • NotSet
  • Number
  • Seconds
  • Weeks
  • Years
N/A
yAxisMaximum
DoubleOptional Sets the Y Axis maximum (default derived from graph data). When both yAxisMinimum and yAxisMaximum are set, if either are not whole numbers, this MAY cause chart data to be rendered incorrectly. N/A N/A
yAxisMinimum
DoubleOptional Sets the Y Axis minimum (default derived from graph data). This value MAY be automatically adjusted when 'yAxisIsLogarithmic=true' and the data contains any 0 values, to avoid chart errors (logarithmic charts may not contain y-axis values of 0 or below). When both yAxisMinimum and yAxisMaximum are set, if either are not whole numbers, this MAY cause chart data to be rendered incorrectly. N/A N/A
yAxisMinorGridEnabled
BooleanOptional Whether the Y-axis Minor grid is enabled
  • true
  • false
true
yAxisMinorGridInterval
DoubleOptional A number - (if specified, you must also specify yAxisMinorGridIntervalType)
  • From 0 to 100
N/A
yAxisMinorGridIntervalType
DateTimeIntervalTypeOptional The Minor y-axis grid interval type.
  • Auto
  • Days
  • Hours
  • Milliseconds
  • Minutes
  • Months
  • NotSet
  • Number
  • Seconds
  • Weeks
  • Years
N/A
yAxisWidthPercent
DoubleOptional Set the chart y-axis width as a percent of the chart area. By default, an automatic choice is made.
  • From 0 to 90
N/A

Examples (1)

Example 1:
[Agent.SqlGraph: sql="SELECT CreatedDateTimeUtc, ExecutionResult as [Execution Result] from Jobs order by CreatedDateTimeUtc", connectionString="Server=.;Database=DbName;Trusted_Connection=True;", chartTypes=Line, yAxisLabel="Duration MS"]
An unhandled error has occurred. Reload 🗙