API/CodeSamples/AllowHorizontalBarChart.md
... ...
@@ -0,0 +1,57 @@
1
+#AllowHorizontalBarChart
2
+
3
+[[_TOC_]]
4
+
5
+##About
6
+Changes the setting that displays a "horizontal" checkbox in the chart editor tab. When the box is checked, bar charts will run horizontally instead of vertically.
7
+
8
+**Default Value:** The default value is set to true, which displays a "Horizontal" check box in the chart editor page.
9
+
10
+##Global.asax (C#)
11
+```csharp
12
+public class CustomAdHocConfig : FileSystemAdHocConfig {
13
+ public static void InitializeReporting() {
14
+ //Check to see if we've already initialized.
15
+ if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null)
16
+ return;
17
+ //Initialize System
18
+ AdHocSettings.LicenseKey = "Insert_license_key_here";
19
+ AdHocSettings.SqlServerConnectionString = @"insert_connection_string_here";
20
+ AdHocSettings.GenerateThumbnails = true;
21
+ AdHocSettings.DashboardViewer = "Dashboards.aspx";
22
+ AdHocSettings.ShowSimpleModeViewer = true;
23
+ AdHocSettings.IdentifiersRegex = "^.*[iI][Dd]$";
24
+ AdHocSettings.TabsCssUrl = "Resources/css/tabs.css";
25
+ AdHocSettings.ReportCssUrl = "Resources/css/Report.css";
26
+ AdHocSettings.ShowBetweenDateCalendar = true;
27
+ AdHocSettings.AdHocConfig = new CustomAdHocConfig();
28
+ AdHocSettings.PrintMode = PrintMode.Html2PdfAndHtml;
29
+ AdHocSettings.ChartingEngine = ChartingEngine.HtmlChart;
30
+ AdHocSettings.AllowHorizontalBarChart = false; //relevent setting, setting to false removes horizontal checkbox option for bar chart editor
31
+
32
+```
33
+
34
+##Global.asax (VisualBasic)
35
+```visualbasic
36
+
37
+ Inherits FileSystemAdHocConfig
38
+ Public Shared Sub InitializeReporting()
39
+ 'Check to see if we've already initialized.
40
+ If (HttpContext.Current.Session Is Nothing OrElse (Not (HttpContext.Current.Session("ReportingInitialized") Is Nothing))) Then
41
+ Return
42
+ End If
43
+ 'Initialize System
44
+ AdHocSettings.LicenseKey = "insert_license_key_here"
45
+ AdHocSettings.SqlServerConnectionString = "insert_connection_string_here"
46
+ AdHocSettings.GenerateThumbnails = True
47
+ AdHocSettings.DashboardViewer = "Dashboards.aspx"
48
+ AdHocSettings.ShowSimpleModeViewer = True
49
+ AdHocSettings.IdentifiersRegex = "^.*[iI][Dd]$"
50
+ AdHocSettings.TabsCssUrl = "Resources/css/tabs.css"
51
+ AdHocSettings.ReportCssUrl = "Resources/css/Report.css"
52
+ AdHocSettings.ShowBetweenDateCalendar = True
53
+ AdHocSettings.AdHocConfig = New CustomAdHocConfig()
54
+ AdHocSettings.ChartingEngine = ChartingEngine.HtmlChart
55
+ AdHocSettings.AllowHorizontalBarChart = False // relevent setting
56
+
57
+```