Skip to content

Commit

Permalink
Renamed 'Bar' to 'Column'
Browse files Browse the repository at this point in the history
  • Loading branch information
sinairv committed Jan 1, 2012
1 parent ef24570 commit 8f2b508
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 41 deletions.
44 changes: 22 additions & 22 deletions MSChartWrapper.UI/FormMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions MSChartWrapper.UI/FormMain.cs
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
24 changes: 12 additions & 12 deletions MSChartWrapper/ChartForm.cs
Expand Up @@ -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();
Expand All @@ -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;
Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand All @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions MSChartWrapper/ChartWrapper.cs
Expand Up @@ -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)
{
Expand Down

0 comments on commit 8f2b508

Please sign in to comment.