Skip to content

Commit

Permalink
change data for coommontheme samples
Browse files Browse the repository at this point in the history
  • Loading branch information
Poushali-Guha committed Aug 8, 2018
1 parent fb35853 commit 4e778fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion samples/Pages/CommonThemeUsage.aspx
Expand Up @@ -67,7 +67,7 @@
<input type="radio" name="theme-options" value="ocean"/> Ocean
</label>
</div>
<div><span><a href ="../Default.aspx">GO BACK</a></span></div>
<div><span><a href ="../Default.aspx">Go Back</a></span></div>

</body>
</html>
12 changes: 6 additions & 6 deletions samples/Pages/CommonThemeUsage.aspx.cs
Expand Up @@ -8,17 +8,17 @@ protected void Page_Load(object sender, EventArgs e)
{
// store chart data as json string
string jsonDataFirstChart, jsonDataSecondChart;
jsonDataFirstChart = "{ 'chart': { 'caption': 'Average Fastball Velocity', 'yAxisName' : 'Velocity (in mph)', 'subCaption': '[2005-2016]', 'numberSuffix': ' mph', 'rotateLabels': '1', 'setAdaptiveYMin': '1', }, 'data': [{ 'label': '2005', 'value': '89.45' }, { 'label': '2006', 'value': '89.87' }, { 'label': '2007', 'value': '89.64' }, { 'label': '2008', 'value': '90.13' }, { 'label': '2009', 'value': '90.67' }, { 'label': '2010', 'value': '90.54' }, { 'label': '2011', 'value': '90.75' }, { 'label': '2012', 'value': '90.8' }, { 'label': '2013', 'value': '91.16' }, { 'label': '2014', 'value': '91.37' }, { 'label': '2015', 'value': '91.66' }, { 'label': '2016', 'value': '91.8' }, ] }";
jsonDataSecondChart = "{ 'chart': { 'caption': 'Lead sources by industry', 'yAxisName': 'Number of Leads', 'alignCaptionWithCanvas': '0', 'plotToolText': '<b>$dataValue</b> leads received', }, 'data': [{ 'label': 'Travel & Leisure', 'value': '41' }, { 'label': 'Advertising/Marketing/PR', 'value': '39' }, { 'label': 'Other', 'value': '38' }, { 'label': 'Real Estate', 'value': '32' }, { 'label': 'Communications/Cable/Phone', 'value': '26' }, { 'label': 'Construction', 'value': '25' }, { 'label': 'Entertainment', 'value': '25' }, { 'label': 'Staffing Firm/Full Time/Temporary', 'value': '24' }, { 'label': 'Transportation/Logistics', 'value': '23' }, { 'label': 'Utilities', 'value': '22' }, { 'label': 'Aerospace/Defense Products', 'value': '18' }, { 'label': 'Banking/Finance/Securities', 'value': '16' }, { 'label': 'Consumer Products - Non-Durables', 'value': '15' }, { 'label': 'Distribution', 'value': '13' }, { 'label': 'Education', 'value': '12' }, { 'label': 'Health Products & Services', 'value': '11' }, { 'label': 'Hospitality & Hotels', 'value': '10' }, { 'label': 'Non-Business/Residential', 'value': '6' }, { 'label': 'Pharmaceutical', 'value': '4' }, { 'label': 'Printing & Publishing', 'value': '1' }, { 'label': 'Professional Services', 'value': '1' }, { 'label': 'VAR/ISV', 'value': '1' }, { 'label': 'Warranty Administrators', 'value': '1' } ] }";
jsonDataFirstChart = "{ 'chart': { 'caption': 'Split of Sales by Product Category', 'subCaption': '5 top performing stores - last month', 'plotToolText': '<div><b>\\$label</b><br/>Product : <b>\\$seriesname</b><br/>Sales : <b>\\$\\$value</b></div>', 'theme': 'fusion' }, 'categories': [{ 'category': [{ 'label': 'Garden Groove harbour' }, { 'label': 'Bakersfield Central' }, { 'label': 'Los Angeles Topanga' }, { 'label': 'Compton-Rancho Dom' }, { 'label': 'Daly City Serramonte' }] }], 'dataset': [{ 'seriesname': 'Non-Food Products', 'data': [{ 'value': '28800' }, { 'value': '25400' }, { 'value': '21800' }, { 'value': '19500' }, { 'value': '11500' }] }, { 'seriesname': 'Food Products', 'data': [{ 'value': '17000' }, { 'value': '19500' }, { 'value': '12500' }, { 'value': '14500' }, { 'value': '17500' }] }] }";
jsonDataSecondChart = "{ 'chart': { 'caption': 'Harry\\'s SuperMart', 'subCaption': 'Top 5 stores in last month by revenue', 'theme': 'fusion' }, 'data':[ { 'label': 'Bakersfield Central', 'value': '880000' }, { 'label': 'Garden Groove harbour', 'value': '730000' }, { 'label': 'Los Angeles Topanga', 'value': '590000' }, { 'label': 'Compton-Rancho Dom', 'value': '520000' }, { 'label': 'Daly City Serramonte', 'value': '330000' } ] }";

// Create chart instance for first chart
Chart lineChart = new Chart("line", "first_chart", "600", "300", "json", jsonDataFirstChart);
Chart overlappedColumnChart = new Chart("overlappedcolumn2d", "first_chart", "600", "300", "json", jsonDataFirstChart);
// create chart instance for second chart
Chart barChart = new Chart("bar2d","second_chart","600","300","json", jsonDataSecondChart);
Chart columnChart = new Chart("column2d","second_chart","600","300","json", jsonDataSecondChart);
// render first chart
Literal1.Text = lineChart.Render();
Literal1.Text = overlappedColumnChart.Render();
// render second chart
Literal2.Text = barChart.Render();
Literal2.Text = columnChart.Render();
}

}

0 comments on commit 4e778fc

Please sign in to comment.