15,896,912 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Rams@music (Top 26 by date)
Rams@music
27-Oct-15 2:46am
View
thank u this is working
and iam try with this. i got result but yours is more preferable
if(ds.Tables[0].Rows[0]["COMPANYID"].ToString()=="")
{
com_id = 0;
}
else
{
com_id=Convert.ToInt32(ds.Tables[0].Rows[0]["COMPANYID"]);
}
Rams@music
26-Oct-15 5:44am
View
thanks i got output.
Rams@music
26-Oct-15 5:23am
View
hi thanks for reply.
my image url path is correct. iam use this one in design page it showing the image. but when i try this one with backend with string builder it not show the image. how can i solve
Rams@music
26-Oct-15 5:13am
View
thanks for reply.
i try with these two but same result image is not displayed
Rams@music
12-Oct-15 23:56pm
View
Thank you
Rams@music
8-Oct-15 23:49pm
View
this is my cs code
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Text;
public partial class dashboard : System.Web.UI.Page
{
StringBuilder str = new StringBuilder();
//Get connection string from web.config
string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack == false)
{
BindChart();
}
}
private DataTable GetData()
{
DataTable dt = new DataTable();
string cmd = "select YEAR,sales from area_chart";
SqlDataAdapter adp = new SqlDataAdapter(cmd, constr);
adp.Fill(dt);
return dt;
}
private void BindChart()
{
DataTable dt = new DataTable();
try
{
dt = GetData();
str.Append(@" <script type='text/javascript'>
google.load('visualization', '1.0', {'packages':['controls']});
google.setOnLoadCallback(dashboardd);
function dashboardd() {
var data = google.visualization.arrayToDataTable([
['YEAR','sales',],");
int count = dt.Rows.Count - 1;
for (int i = 0; i <= count; i++)
{
if (i == count)
{
str.Append("['" + dt.Rows[i]["YEAR"].ToString() + "', " + dt.Rows[i]["sales"].ToString() + "]]);}");
}
else
{
str.Append("['" + dt.Rows[i]["YEAR"].ToString() + "', " + dt.Rows[i]["sales"].ToString() + "],");
}
}
// Create a dashboard.
str.Append("var dashboard = new google.visualization.Dashboard( document.getElementById('dashboard_div'));");
// Create a range slider, passing some options
str.Append(" var donutRangeSlider = new google.visualization.ControlWrapper({'controlType': 'NumberRangeFilter', 'containerId': 'filter_div','options': { 'filterColumnLabel': 'sales' }});");
// Create a pie chart, passing some options
str.Append("var pieChart = new google.visualization.ChartWrapper({'chartType': 'PieChart','containerId': 'chart_div','options': {'width': 300, 'height': 300,'pieSliceText': 'value','legend': 'right'}});");
// Establish dependencies, declaring that 'filter' drives 'pieChart',
// so that the pie chart will only display entries that are let through
// given the chosen slider range.
str.Append(" dashboard.bind(donutRangeSlider, pieChart);");
// Draw the dashboard.
str.Append("dashboard.draw(data);");
//str.Append("var options = { title:'year And Expance',hAxis: {title: 'Year', titleTextStyle: {color: '#333'}},};var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));");
//str.Append("chart.draw(data, options);};");
str.Append("</script>");
lt.Text = str.ToString();
}
catch
{
}
}
}
Rams@music
8-Oct-15 7:32am
View
is there any other chart controles to work in offline and performence like google charts.
Rams@music
8-Oct-15 7:29am
View
i do this one allready. it gives error
Rams@music
8-Oct-15 6:40am
View
GO
/****** Object: Table [dbo].[area_chart] Script Date: 10/08/2015 16:08:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[area_chart](
[year] [int] NULL,
[sales] [int] NULL,
[expance] [int] NULL
) ON [PRIMARY]
GO
This Is My Data
Year Sales expance
2010 100000 50000
2012 500000 700000
2014 5000000 4000000
2016 150000 100000
Rams@music
8-Oct-15 5:36am
View
ya i give data by table.
this is my query: select YEAR,sales from area_chart
and i provide this one into datatable function Like This
Code In C#:-
function drawRegionsMap() {
var data = google.visualization.arrayToDataTable([
['YEAR','sales'],");
int count = dt.Rows.Count - 1;
for (int i = 0; i <= count; i++)
{
str.Append("['" + dt.Rows[i]["YEAR"].ToString() + "', " + dt.Rows[i]["sales"].ToString() + "],");
if (i == count)
{
str.Append("['" + dt.Rows[i]["YEAR"].ToString() + "', " + dt.Rows[i]["sales"].ToString() + "]]);}");
}
}
when i give like this it through the run time error
Rams@music
8-Oct-15 3:03am
View
if i give hardcoded values of year, sales it gives the o/p. when i give the values from datatable as backend error coming what can i do
Rams@music
8-Oct-15 1:54am
View
hithank u.
copy this sourse and give in my aspx. and it give me output.
but in C# it gives error. plese check my C# code.
and tell me is there any changes to do.
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Text;
public partial class dashboard : System.Web.UI.Page
{
StringBuilder str = new StringBuilder();
//Get connection string from web.config
string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack == false)
{
BindChart();
}
}
private DataTable GetData()
{
DataTable dt = new DataTable();
string cmd = "select YEAR,sales from area_chart";
SqlDataAdapter adp = new SqlDataAdapter(cmd, constr);
adp.Fill(dt);
return dt;
}
private void BindChart()
{
DataTable dt = new DataTable();
try
{
dt = GetData();
str.Append(@" <script type='text/javascript'>
google.load('visualization', '1.0', {'packages':['controls']});
google.setOnLoadCallback(dashboardd);
function dashboardd() {
var data = google.visualization.arrayToDataTable([
['YEAR','sales'],");
int count = dt.Rows.Count - 1;
for (int i = 0; i <= count; i++)
{
if (i == count)
{
str.Append("['" + dt.Rows[i]["YEAR"].ToString() + "', " + dt.Rows[i]["sales"].ToString() + "]]);}");
}
else
{
str.Append("['" + dt.Rows[i]["YEAR"].ToString() + "', " + dt.Rows[i]["sales"].ToString() + "],");
}
}
// Create a dashboard.
str.Append("var dashboard = new google.visualization.Dashboard( document.getElementById('dashboard_div'));");
// Create a range slider, passing some options
str.Append(" var donutRangeSlider = new google.visualization.ControlWrapper({'controlType': 'NumberRangeFilter', 'containerId': 'filter_div','options': { 'filterColumnLabel': 'sales' }});");
// Create a pie chart, passing some options
str.Append("var pieChart = new google.visualization.ChartWrapper({'chartType': 'PieChart','containerId': 'chart_div','options': {'width': 300, 'height': 300,'pieSliceText': 'value','legend': 'right'}});");
// Establish dependencies, declaring that 'filter' drives 'pieChart',
// so that the pie chart will only display entries that are let through
// given the chosen slider range.
str.Append(" dashboard.bind(donutRangeSlider, pieChart);");
// Draw the dashboard.
str.Append("dashboard.draw(data);");
//str.Append("var options = { title:'year And Expance',hAxis: {title: 'Year', titleTextStyle: {color: '#333'}},};var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));");
//str.Append("chart.draw(data, options);};");
str.Append("</script>");
lt.Text = str.ToString();
}
catch
{
}
}
}
thank you.
you are good u help me alot
Rams@music
8-Oct-15 1:40am
View
thank you.
these two are same i got this only.
it does show any o/p.
it give javascript runtime error
dashboard is null.
Rams@music
8-Oct-15 1:27am
View
this is my source as you said.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
</title>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
</head>
<body>
<form name="form1" method="post" action="dashboard.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUIOTEyNDUzNDYPZBYCAgMPZBYCAgEPFgIeBFRleHQF8QcgPHNjcmlwdCB0eXBlPSd0ZXh0L2phdmFzY3JpcHQnPg0KDQogICAgICAgICAgICAgICAgICAgICAgICAgZ29vZ2xlLmxvYWQoJ3Zpc3VhbGl6YXRpb24nLCAnMS4wJywgeydwYWNrYWdlcyc6Wydjb250cm9scyddfSk7DQoNCiAgICAgICAgICAgICAgICAgIA0KDQoNCiAgICAgICAgICAgICAgICAgICAgICAgICBnb29nbGUuc2V0T25Mb2FkQ2FsbGJhY2soZGFzaGJvYXJkZCk7DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gZGFzaGJvYXJkZCgpIHsNCg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gZ29vZ2xlLnZpc3VhbGl6YXRpb24uYXJyYXlUb0RhdGFUYWJsZShbDQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFsnWUVBUicsJ3NhbGVzJ10sWycyMDEwJywgIDEwMDAwMF0sWycyMDEyJywgIDUwMDAwMF0sWycyMDE0JywgIDUwMDAwMDBdLFsnMjAxNicsICAxNTAwMDBdXSk7fXZhciBkYXNoYm9hcmQgPSBuZXcgZ29vZ2xlLnZpc3VhbGl6YXRpb24uRGFzaGJvYXJkKCBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnZGFzaGJvYXJkX2RpdicpKTsgdmFyIGRvbnV0UmFuZ2VTbGlkZXIgPSBuZXcgZ29vZ2xlLnZpc3VhbGl6YXRpb24uQ29udHJvbFdyYXBwZXIoeydjb250cm9sVHlwZSc6ICdOdW1iZXJSYW5nZUZpbHRlcicsICdjb250YWluZXJJZCc6ICdmaWx0ZXJfZGl2Jywnb3B0aW9ucyc6IHsgJ2ZpbHRlckNvbHVtbkxhYmVsJzogJ3NhbGVzJyB9fSk7dmFyIHBpZUNoYXJ0ID0gbmV3IGdvb2dsZS52aXN1YWxpemF0aW9uLkNoYXJ0V3JhcHBlcih7J2NoYXJ0VHlwZSc6ICdQaWVDaGFydCcsJ2NvbnRhaW5lcklkJzogJ2NoYXJ0X2RpdicsJ29wdGlvbnMnOiB7J3dpZHRoJzogMzAwLCAnaGVpZ2h0JzogMzAwLCdwaWVTbGljZVRleHQnOiAndmFsdWUnLCdsZWdlbmQnOiAncmlnaHQnfX0pOyBkYXNoYm9hcmQuYmluZChkb251dFJhbmdlU2xpZGVyLCBwaWVDaGFydCk7ZGFzaGJvYXJkLmRyYXcoZGF0YSk7PC9zY3JpcHQ+ZGR8xnemBsi93hinamaHe0yPCW974Q==" />
</div>
<div>
<script type='text/javascript'>
google.load('visualization', '1.0', {'packages':['controls']});
google.setOnLoadCallback(dashboardd);
function dashboardd() {
var data = google.visualization.arrayToDataTable([
['YEAR','sales'],['2010', 100000],['2012', 500000],['2014', 5000000],['2016', 150000]]);}var dashboard = new google.visualization.Dashboard( document.getElementById('dashboard_div')); var donutRangeSlider = new google.visualization.ControlWrapper({'controlType': 'NumberRangeFilter', 'containerId': 'filter_div','options': { 'filterColumnLabel': 'sales' }});var pieChart = new google.visualization.ChartWrapper({'chartType': 'PieChart','containerId': 'chart_div','options': {'width': 300, 'height': 300,'pieSliceText': 'value','legend': 'right'}}); dashboard.bind(donutRangeSlider, pieChart);dashboard.draw(data);</script>
<div>
<div id="dashboard_div">
<div id="filter_div"></div>
<div id="chart_div"></div>
</div>
</div>
</div>
</form>
</body>
</html>
Rams@music
8-Oct-15 1:21am
View
thank you i put sales.
but showing error as same dashboard is null.
iam trying this from backend(C#).
when iam trying with Aspx there is no problem. i got o/p with google code
Rams@music
8-Oct-15 1:01am
View
hi thank you. it is working when i give in aspx directly. but trying with c# its getting error.
i want it from back end
Rams@music
7-Oct-15 7:53am
View
the error is occured these 3 Lines
1)google.visualization.Dashboard(document.getElementById('dashboard_div'));");
2)var yearslider = new google.visualization.ControlWrapper({ 'controlType': 'NumberRangeFilter', 'containerId': 'filter_div',
'options': { 'filterColumnLabel': 'YEAR' }});");
3)var pieChart = new google.visualization.ChartWrapper({'chartType': 'PieChart','containerId': 'chart_div', 'options': { 'width': 300,'height': 300,'pieSliceText': 'value', 'legend': 'right' } });");
error is occured at these 3 Lines
Rams@music
7-Oct-15 7:01am
View
hi.
thank you for reply
can u edit my code please.
iam new to .net. idnt know how to use web methods
Rams@music
7-Oct-15 0:06am
View
where i get .js file for visuvlization.
help me.
Thank you.
Rams@music
6-Oct-15 4:40am
View
how to do that?
i dont understand. help me
Rams@music
5-Oct-15 2:17am
View
thank u
Rams@music
5-Oct-15 2:17am
View
thank u
Rams@music
18-Sep-15 0:42am
View
hi thanks for reply i dnt know much more about jquery iam new to jquery and this type of menus. but i will try to some example from google but they are not work. please can u explain me breafly regarding to this.
thank you
Rams@music
18-Sep-15 0:36am
View
hi thanks for reply i try this but in this i dont get submenus..
Rams@music
16-Sep-15 7:59am
View
i got menus. with this i dont have any problem. actuvally i want menus in coloumn wise
ex:-when i put cursor on about us. what ever the submenus releted to aboutus are comes in coloumn wise like this
aboutus
|
|
AboutOrganigetion ourclient
Location Contactus
like this i want submenus in column wise
Rams@music
16-Sep-15 7:44am
View
i got menus and sub menus from database but my requirement is all the sub menus are comes in 2 or more coloumns but in menu controle these are comes in vertical or horizontal.
is there any way to do like this web site menu http://www.yvr.ca/en/Default. menus from sqlserver
Show More