Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Renamed 'Bar' to 'Column'

  • Loading branch information...
commit 8f2b5082c42f33bce445419725314dd29369a1cd 1 parent ef24570
Sina Iravanian authored
44 MSChartWrapper.UI/FormMain.Designer.cs
@@ -32,12 +32,12 @@ protected override void Dispose(bool disposing)
32 32 private void InitializeComponent()
33 33 {
34 34 this.btnAddLine = new System.Windows.Forms.Button();
35   - this.btnAddBar = new System.Windows.Forms.Button();
  35 + this.btnAddColumn = new System.Windows.Forms.Button();
36 36 this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
37 37 this.chartWrapper = new MSChartWrapper.ChartWrapper();
38 38 this.btnClearChart = new System.Windows.Forms.Button();
39 39 this.btnLineChartWindow = new System.Windows.Forms.Button();
40   - this.btnBarChartWindow = new System.Windows.Forms.Button();
  40 + this.btnColumnChartWindow = new System.Windows.Forms.Button();
41 41 this.btnLineChartCustomWindow = new System.Windows.Forms.Button();
42 42 this.SuspendLayout();
43 43 //
@@ -51,15 +51,15 @@ private void InitializeComponent()
51 51 this.btnAddLine.UseVisualStyleBackColor = true;
52 52 this.btnAddLine.Click += new System.EventHandler(this.BtnAddLineClick);
53 53 //
54   - // btnAddBar
  54 + // btnAddColumn
55 55 //
56   - this.btnAddBar.Location = new System.Drawing.Point(123, 3);
57   - this.btnAddBar.Name = "btnAddBar";
58   - this.btnAddBar.Size = new System.Drawing.Size(109, 23);
59   - this.btnAddBar.TabIndex = 2;
60   - this.btnAddBar.Text = "Add Bar";
61   - this.btnAddBar.UseVisualStyleBackColor = true;
62   - this.btnAddBar.Click += new System.EventHandler(this.BtnAddBarClick);
  56 + this.btnAddColumn.Location = new System.Drawing.Point(123, 3);
  57 + this.btnAddColumn.Name = "btnAddColumn";
  58 + this.btnAddColumn.Size = new System.Drawing.Size(109, 23);
  59 + this.btnAddColumn.TabIndex = 2;
  60 + this.btnAddColumn.Text = "Add Column Chart";
  61 + this.btnAddColumn.UseVisualStyleBackColor = true;
  62 + this.btnAddColumn.Click += new System.EventHandler(this.BtnAddColumnClick);
63 63 //
64 64 // propertyGrid1
65 65 //
@@ -109,15 +109,15 @@ private void InitializeComponent()
109 109 this.btnLineChartWindow.UseVisualStyleBackColor = true;
110 110 this.btnLineChartWindow.Click += new System.EventHandler(this.BtnLineChartWindowClick);
111 111 //
112   - // btnBarChartWindow
  112 + // btnColumnChartWindow
113 113 //
114   - this.btnBarChartWindow.Location = new System.Drawing.Point(495, 3);
115   - this.btnBarChartWindow.Name = "btnBarChartWindow";
116   - this.btnBarChartWindow.Size = new System.Drawing.Size(109, 23);
117   - this.btnBarChartWindow.TabIndex = 7;
118   - this.btnBarChartWindow.Text = "Bar Chart Window";
119   - this.btnBarChartWindow.UseVisualStyleBackColor = true;
120   - this.btnBarChartWindow.Click += new System.EventHandler(this.BtnBarChartWindowClick);
  114 + this.btnColumnChartWindow.Location = new System.Drawing.Point(495, 3);
  115 + this.btnColumnChartWindow.Name = "btnColumnChartWindow";
  116 + this.btnColumnChartWindow.Size = new System.Drawing.Size(109, 23);
  117 + this.btnColumnChartWindow.TabIndex = 7;
  118 + this.btnColumnChartWindow.Text = "Column Chart Window";
  119 + this.btnColumnChartWindow.UseVisualStyleBackColor = true;
  120 + this.btnColumnChartWindow.Click += new System.EventHandler(this.BtnColumnChartWindowClick);
121 121 //
122 122 // btnLineChartCustomWindow
123 123 //
@@ -135,11 +135,11 @@ private void InitializeComponent()
135 135 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
136 136 this.ClientSize = new System.Drawing.Size(1023, 692);
137 137 this.Controls.Add(this.btnLineChartCustomWindow);
138   - this.Controls.Add(this.btnBarChartWindow);
  138 + this.Controls.Add(this.btnColumnChartWindow);
139 139 this.Controls.Add(this.btnLineChartWindow);
140 140 this.Controls.Add(this.btnClearChart);
141 141 this.Controls.Add(this.propertyGrid1);
142   - this.Controls.Add(this.btnAddBar);
  142 + this.Controls.Add(this.btnAddColumn);
143 143 this.Controls.Add(this.btnAddLine);
144 144 this.Controls.Add(this.chartWrapper);
145 145 this.MinimumSize = new System.Drawing.Size(590, 410);
@@ -154,11 +154,11 @@ private void InitializeComponent()
154 154
155 155 private ChartWrapper chartWrapper;
156 156 private System.Windows.Forms.Button btnAddLine;
157   - private System.Windows.Forms.Button btnAddBar;
  157 + private System.Windows.Forms.Button btnAddColumn;
158 158 private System.Windows.Forms.PropertyGrid propertyGrid1;
159 159 private System.Windows.Forms.Button btnClearChart;
160 160 private System.Windows.Forms.Button btnLineChartWindow;
161   - private System.Windows.Forms.Button btnBarChartWindow;
  161 + private System.Windows.Forms.Button btnColumnChartWindow;
162 162 private System.Windows.Forms.Button btnLineChartCustomWindow;
163 163 }
164 164 }
10 MSChartWrapper.UI/FormMain.cs
@@ -26,13 +26,13 @@ private void BtnAddLineClick(object sender, EventArgs e)
26 26 chartWrapper.AddLinePlot("Random " + m_numCharts++, arSer);
27 27 }
28 28
29   - private void BtnAddBarClick(object sender, EventArgs e)
  29 + private void BtnAddColumnClick(object sender, EventArgs e)
30 30 {
31 31 var arSer = new double[ArraySize];
32 32 for (int i = 0; i < ArraySize; i++)
33 33 arSer[i] = s_rnd.NextDouble()*10;
34 34
35   - chartWrapper.AddBarPlot("Random " + m_numCharts++, (from n in arSer select n.ToString("F03")).ToArray(), arSer);
  35 + chartWrapper.AddColumnPlot("Random " + m_numCharts++, (from n in arSer select n.ToString("F03")).ToArray(), arSer);
36 36 }
37 37
38 38 private void BtnClearChartClick(object sender, EventArgs e)
@@ -56,15 +56,15 @@ private void BtnLineChartWindowClick(object sender, EventArgs e)
56 56 "Sine vs Cosine", "x", "value", "Line Chart Window Demo");
57 57 }
58 58
59   - private void BtnBarChartWindowClick(object sender, EventArgs e)
  59 + private void BtnColumnChartWindowClick(object sender, EventArgs e)
60 60 {
61 61 var vals1 = new[] { 1, 3, 5, 2, 7 };
62 62 var vals2 = new[] { 7, 5, 3, 2, 1 };
63 63 var labels = new [] {"year 1", "year 2", "year 3", "year 4", "year 5"};
64 64
65   - ChartForm.ShowBarChartForm(new[] { "Company 1", "Company 2" }, labels,
  65 + ChartForm.ShowColumnChartForm(new[] { "Company 1", "Company 2" }, labels,
66 66 new[] { vals1, vals2 }, "Performance of Companies",
67   - "year", "income in billion dollars", "Bar Chart Window Demo");
  67 + "year", "income in billion dollars", "Column Chart Window Demo");
68 68 }
69 69
70 70 private void BtnLineChartCustomWindowClick(object sender, EventArgs e)
24 MSChartWrapper/ChartForm.cs
@@ -64,20 +64,20 @@ public ChartForm()
64 64 }
65 65
66 66 /// <summary>
67   - /// Shows a chart form in a separate window with bar charts plotted
  67 + /// Shows a chart form in a separate window with column charts plotted
68 68 /// </summary>
69 69 /// <typeparam name="T">the type of values to be plotted</typeparam>
70 70 /// <param name="owner">The top-level window that will own this form</param>
71 71 /// <param name="showModal">if set to <c>true</c> show the window in a modal state</param>
72 72 /// <param name="customization">Further customization to the chart</param>
73   - /// <param name="names">The name of each bar-chart to be plotted</param>
  73 + /// <param name="names">The name of each column-chart to be plotted</param>
74 74 /// <param name="labels">The labels (per value, not series)</param>
75 75 /// <param name="values">The values of each line to be plotted. One array per line.</param>
76 76 /// <param name="chartTitle">The title of the chart</param>
77 77 /// <param name="xTitle">The title of the x-axis</param>
78 78 /// <param name="yTitle">The title of the y-axis</param>
79 79 /// <param name="formTitle">The title of the chart form</param>
80   - private static void ShowBarChartFormBase<T>(IWin32Window owner, bool showModal, Action<ChartWrapper> customization,
  80 + private static void ShowColumnChartFormBase<T>(IWin32Window owner, bool showModal, Action<ChartWrapper> customization,
81 81 string[] names, string[] labels, T[][] values, string chartTitle, string xTitle, string yTitle, string formTitle)
82 82 {
83 83 var frm = new ChartForm();
@@ -87,7 +87,7 @@ public ChartForm()
87 87
88 88 for (int i = 0; i < names.Length; i++)
89 89 {
90   - frm.chartMain.AddBarPlot(names[i], labels, values[i]);
  90 + frm.chartMain.AddColumnPlot(names[i], labels, values[i]);
91 91 }
92 92
93 93 frm.chartMain.Title = chartTitle;
@@ -149,10 +149,10 @@ public ChartForm()
149 149 }
150 150
151 151 /// <summary>
152   - /// Shows a chart form in a separate modeless window with bar charts plotted
  152 + /// Shows a chart form in a separate modeless window with column charts plotted
153 153 /// </summary>
154 154 /// <typeparam name="T">the type of values to be plotted</typeparam>
155   - /// <param name="names">The name of each bar-chart to be plotted</param>
  155 + /// <param name="names">The name of each column-chart to be plotted</param>
156 156 /// <param name="labels">The labels (per value, not series)</param>
157 157 /// <param name="values">The values of each line to be plotted. One array per line.</param>
158 158 /// <param name="chartTitle">The title of the chart</param>
@@ -161,19 +161,19 @@ public ChartForm()
161 161 /// <param name="formTitle">The title of the chart form</param>
162 162 /// <param name="owner">The top-level window that will own this form</param>
163 163 /// <param name="customization">Further customization to the chart</param>
164   - public static void ShowBarChartForm<T>(string[] names, string[] labels, T[][] values,
  164 + public static void ShowColumnChartForm<T>(string[] names, string[] labels, T[][] values,
165 165 string chartTitle, string xTitle, string yTitle, string formTitle,
166 166 IWin32Window owner = null, Action<ChartWrapper> customization = null)
167 167 {
168   - ShowBarChartFormBase(owner, false, customization,
  168 + ShowColumnChartFormBase(owner, false, customization,
169 169 names, labels, values, chartTitle, xTitle, yTitle, formTitle);
170 170 }
171 171
172 172 /// <summary>
173   - /// Shows a chart form in a separate modal window with bar charts plotted
  173 + /// Shows a chart form in a separate modal window with column charts plotted
174 174 /// </summary>
175 175 /// <typeparam name="T">the type of values to be plotted</typeparam>
176   - /// <param name="names">The name of each bar-chart to be plotted</param>
  176 + /// <param name="names">The name of each column-chart to be plotted</param>
177 177 /// <param name="labels">The labels (per value, not series)</param>
178 178 /// <param name="values">The values of each line to be plotted. One array per line.</param>
179 179 /// <param name="chartTitle">The title of the chart</param>
@@ -182,11 +182,11 @@ public ChartForm()
182 182 /// <param name="formTitle">The title of the chart form</param>
183 183 /// <param name="owner">The top-level window that will own this form</param>
184 184 /// <param name="customization">Further customization to the chart</param>
185   - public static void ShowBarChartFormModal<T>(string[] names, string[] labels, T[][] values,
  185 + public static void ShowColumnChartFormModal<T>(string[] names, string[] labels, T[][] values,
186 186 string chartTitle, string xTitle, string yTitle, string formTitle,
187 187 IWin32Window owner = null, Action<ChartWrapper> customization = null)
188 188 {
189   - ShowBarChartFormBase(owner, true, customization,
  189 + ShowColumnChartFormBase(owner, true, customization,
190 190 names, labels, values, chartTitle, xTitle, yTitle, formTitle);
191 191 }
192 192
4 MSChartWrapper/ChartWrapper.cs
@@ -321,13 +321,13 @@ public void SaveChart()
321 321 }
322 322
323 323 /// <summary>
324   - /// Adds a bar plot to the chart.
  324 + /// Adds a column plot to the chart.
325 325 /// </summary>
326 326 /// <typeparam name="T">The type of the values</typeparam>
327 327 /// <param name="name">The name of the series.</param>
328 328 /// <param name="labels">The labels.</param>
329 329 /// <param name="values">The values.</param>
330   - public void AddBarPlot<T>(string name, string[] labels, T[] values)
  330 + public void AddColumnPlot<T>(string name, string[] labels, T[] values)
331 331 {
332 332 if (m_seriesNames.Count == 1)
333 333 {

0 comments on commit 8f2b508

Please sign in to comment.
Something went wrong with that request. Please try again.