Skip to content
Browse files

Renamed 'Bar' to 'Column'

  • Loading branch information...
1 parent ef24570 commit 8f2b5082c42f33bce445419725314dd29369a1cd @sinairv committed Jan 1, 2012
View
44 MSChartWrapper.UI/FormMain.Designer.cs
@@ -32,12 +32,12 @@ protected override void Dispose(bool disposing)
private void InitializeComponent()
{
this.btnAddLine = new System.Windows.Forms.Button();
- this.btnAddBar = new System.Windows.Forms.Button();
+ this.btnAddColumn = new System.Windows.Forms.Button();
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.chartWrapper = new MSChartWrapper.ChartWrapper();
this.btnClearChart = new System.Windows.Forms.Button();
this.btnLineChartWindow = new System.Windows.Forms.Button();
- this.btnBarChartWindow = new System.Windows.Forms.Button();
+ this.btnColumnChartWindow = new System.Windows.Forms.Button();
this.btnLineChartCustomWindow = new System.Windows.Forms.Button();
this.SuspendLayout();
//
@@ -51,15 +51,15 @@ private void InitializeComponent()
this.btnAddLine.UseVisualStyleBackColor = true;
this.btnAddLine.Click += new System.EventHandler(this.BtnAddLineClick);
//
- // btnAddBar
+ // btnAddColumn
//
- this.btnAddBar.Location = new System.Drawing.Point(123, 3);
- this.btnAddBar.Name = "btnAddBar";
- this.btnAddBar.Size = new System.Drawing.Size(109, 23);
- this.btnAddBar.TabIndex = 2;
- this.btnAddBar.Text = "Add Bar";
- this.btnAddBar.UseVisualStyleBackColor = true;
- this.btnAddBar.Click += new System.EventHandler(this.BtnAddBarClick);
+ this.btnAddColumn.Location = new System.Drawing.Point(123, 3);
+ this.btnAddColumn.Name = "btnAddColumn";
+ this.btnAddColumn.Size = new System.Drawing.Size(109, 23);
+ this.btnAddColumn.TabIndex = 2;
+ this.btnAddColumn.Text = "Add Column Chart";
+ this.btnAddColumn.UseVisualStyleBackColor = true;
+ this.btnAddColumn.Click += new System.EventHandler(this.BtnAddColumnClick);
//
// propertyGrid1
//
@@ -109,15 +109,15 @@ private void InitializeComponent()
this.btnLineChartWindow.UseVisualStyleBackColor = true;
this.btnLineChartWindow.Click += new System.EventHandler(this.BtnLineChartWindowClick);
//
- // btnBarChartWindow
+ // btnColumnChartWindow
//
- this.btnBarChartWindow.Location = new System.Drawing.Point(495, 3);
- this.btnBarChartWindow.Name = "btnBarChartWindow";
- this.btnBarChartWindow.Size = new System.Drawing.Size(109, 23);
- this.btnBarChartWindow.TabIndex = 7;
- this.btnBarChartWindow.Text = "Bar Chart Window";
- this.btnBarChartWindow.UseVisualStyleBackColor = true;
- this.btnBarChartWindow.Click += new System.EventHandler(this.BtnBarChartWindowClick);
+ this.btnColumnChartWindow.Location = new System.Drawing.Point(495, 3);
+ this.btnColumnChartWindow.Name = "btnColumnChartWindow";
+ this.btnColumnChartWindow.Size = new System.Drawing.Size(109, 23);
+ this.btnColumnChartWindow.TabIndex = 7;
+ this.btnColumnChartWindow.Text = "Column Chart Window";
+ this.btnColumnChartWindow.UseVisualStyleBackColor = true;
+ this.btnColumnChartWindow.Click += new System.EventHandler(this.BtnColumnChartWindowClick);
//
// btnLineChartCustomWindow
//
@@ -135,11 +135,11 @@ private void InitializeComponent()
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1023, 692);
this.Controls.Add(this.btnLineChartCustomWindow);
- this.Controls.Add(this.btnBarChartWindow);
+ this.Controls.Add(this.btnColumnChartWindow);
this.Controls.Add(this.btnLineChartWindow);
this.Controls.Add(this.btnClearChart);
this.Controls.Add(this.propertyGrid1);
- this.Controls.Add(this.btnAddBar);
+ this.Controls.Add(this.btnAddColumn);
this.Controls.Add(this.btnAddLine);
this.Controls.Add(this.chartWrapper);
this.MinimumSize = new System.Drawing.Size(590, 410);
@@ -154,11 +154,11 @@ private void InitializeComponent()
private ChartWrapper chartWrapper;
private System.Windows.Forms.Button btnAddLine;
- private System.Windows.Forms.Button btnAddBar;
+ private System.Windows.Forms.Button btnAddColumn;
private System.Windows.Forms.PropertyGrid propertyGrid1;
private System.Windows.Forms.Button btnClearChart;
private System.Windows.Forms.Button btnLineChartWindow;
- private System.Windows.Forms.Button btnBarChartWindow;
+ private System.Windows.Forms.Button btnColumnChartWindow;
private System.Windows.Forms.Button btnLineChartCustomWindow;
}
}
View
10 MSChartWrapper.UI/FormMain.cs
@@ -26,13 +26,13 @@ private void BtnAddLineClick(object sender, EventArgs e)
chartWrapper.AddLinePlot("Random " + m_numCharts++, arSer);
}
- private void BtnAddBarClick(object sender, EventArgs e)
+ private void BtnAddColumnClick(object sender, EventArgs e)
{
var arSer = new double[ArraySize];
for (int i = 0; i < ArraySize; i++)
arSer[i] = s_rnd.NextDouble()*10;
- chartWrapper.AddBarPlot("Random " + m_numCharts++, (from n in arSer select n.ToString("F03")).ToArray(), arSer);
+ chartWrapper.AddColumnPlot("Random " + m_numCharts++, (from n in arSer select n.ToString("F03")).ToArray(), arSer);
}
private void BtnClearChartClick(object sender, EventArgs e)
@@ -56,15 +56,15 @@ private void BtnLineChartWindowClick(object sender, EventArgs e)
"Sine vs Cosine", "x", "value", "Line Chart Window Demo");
}
- private void BtnBarChartWindowClick(object sender, EventArgs e)
+ private void BtnColumnChartWindowClick(object sender, EventArgs e)
{
var vals1 = new[] { 1, 3, 5, 2, 7 };
var vals2 = new[] { 7, 5, 3, 2, 1 };
var labels = new [] {"year 1", "year 2", "year 3", "year 4", "year 5"};
- ChartForm.ShowBarChartForm(new[] { "Company 1", "Company 2" }, labels,
+ ChartForm.ShowColumnChartForm(new[] { "Company 1", "Company 2" }, labels,
new[] { vals1, vals2 }, "Performance of Companies",
- "year", "income in billion dollars", "Bar Chart Window Demo");
+ "year", "income in billion dollars", "Column Chart Window Demo");
}
private void BtnLineChartCustomWindowClick(object sender, EventArgs e)
View
24 MSChartWrapper/ChartForm.cs
@@ -64,20 +64,20 @@ public ChartForm()
}
/// <summary>
- /// Shows a chart form in a separate window with bar charts plotted
+ /// Shows a chart form in a separate window with column charts plotted
/// </summary>
/// <typeparam name="T">the type of values to be plotted</typeparam>
/// <param name="owner">The top-level window that will own this form</param>
/// <param name="showModal">if set to <c>true</c> show the window in a modal state</param>
/// <param name="customization">Further customization to the chart</param>
- /// <param name="names">The name of each bar-chart to be plotted</param>
+ /// <param name="names">The name of each column-chart to be plotted</param>
/// <param name="labels">The labels (per value, not series)</param>
/// <param name="values">The values of each line to be plotted. One array per line.</param>
/// <param name="chartTitle">The title of the chart</param>
/// <param name="xTitle">The title of the x-axis</param>
/// <param name="yTitle">The title of the y-axis</param>
/// <param name="formTitle">The title of the chart form</param>
- private static void ShowBarChartFormBase<T>(IWin32Window owner, bool showModal, Action<ChartWrapper> customization,
+ private static void ShowColumnChartFormBase<T>(IWin32Window owner, bool showModal, Action<ChartWrapper> customization,
string[] names, string[] labels, T[][] values, string chartTitle, string xTitle, string yTitle, string formTitle)
{
var frm = new ChartForm();
@@ -87,7 +87,7 @@ public ChartForm()
for (int i = 0; i < names.Length; i++)
{
- frm.chartMain.AddBarPlot(names[i], labels, values[i]);
+ frm.chartMain.AddColumnPlot(names[i], labels, values[i]);
}
frm.chartMain.Title = chartTitle;
@@ -149,10 +149,10 @@ public ChartForm()
}
/// <summary>
- /// Shows a chart form in a separate modeless window with bar charts plotted
+ /// Shows a chart form in a separate modeless window with column charts plotted
/// </summary>
/// <typeparam name="T">the type of values to be plotted</typeparam>
- /// <param name="names">The name of each bar-chart to be plotted</param>
+ /// <param name="names">The name of each column-chart to be plotted</param>
/// <param name="labels">The labels (per value, not series)</param>
/// <param name="values">The values of each line to be plotted. One array per line.</param>
/// <param name="chartTitle">The title of the chart</param>
@@ -161,19 +161,19 @@ public ChartForm()
/// <param name="formTitle">The title of the chart form</param>
/// <param name="owner">The top-level window that will own this form</param>
/// <param name="customization">Further customization to the chart</param>
- public static void ShowBarChartForm<T>(string[] names, string[] labels, T[][] values,
+ public static void ShowColumnChartForm<T>(string[] names, string[] labels, T[][] values,
string chartTitle, string xTitle, string yTitle, string formTitle,
IWin32Window owner = null, Action<ChartWrapper> customization = null)
{
- ShowBarChartFormBase(owner, false, customization,
+ ShowColumnChartFormBase(owner, false, customization,
names, labels, values, chartTitle, xTitle, yTitle, formTitle);
}
/// <summary>
- /// Shows a chart form in a separate modal window with bar charts plotted
+ /// Shows a chart form in a separate modal window with column charts plotted
/// </summary>
/// <typeparam name="T">the type of values to be plotted</typeparam>
- /// <param name="names">The name of each bar-chart to be plotted</param>
+ /// <param name="names">The name of each column-chart to be plotted</param>
/// <param name="labels">The labels (per value, not series)</param>
/// <param name="values">The values of each line to be plotted. One array per line.</param>
/// <param name="chartTitle">The title of the chart</param>
@@ -182,11 +182,11 @@ public ChartForm()
/// <param name="formTitle">The title of the chart form</param>
/// <param name="owner">The top-level window that will own this form</param>
/// <param name="customization">Further customization to the chart</param>
- public static void ShowBarChartFormModal<T>(string[] names, string[] labels, T[][] values,
+ public static void ShowColumnChartFormModal<T>(string[] names, string[] labels, T[][] values,
string chartTitle, string xTitle, string yTitle, string formTitle,
IWin32Window owner = null, Action<ChartWrapper> customization = null)
{
- ShowBarChartFormBase(owner, true, customization,
+ ShowColumnChartFormBase(owner, true, customization,
names, labels, values, chartTitle, xTitle, yTitle, formTitle);
}
View
4 MSChartWrapper/ChartWrapper.cs
@@ -321,13 +321,13 @@ public void SaveChart()
}
/// <summary>
- /// Adds a bar plot to the chart.
+ /// Adds a column plot to the chart.
/// </summary>
/// <typeparam name="T">The type of the values</typeparam>
/// <param name="name">The name of the series.</param>
/// <param name="labels">The labels.</param>
/// <param name="values">The values.</param>
- public void AddBarPlot<T>(string name, string[] labels, T[] values)
+ public void AddColumnPlot<T>(string name, string[] labels, T[] values)
{
if (m_seriesNames.Count == 1)
{

0 comments on commit 8f2b508

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