MVC ::mvc 2 And Mschart Working Example?
Sep 30, 2010Is there any working example of asp.net mvc with line chart of mschart?
View 5 RepliesIs there any working example of asp.net mvc with line chart of mschart?
View 5 RepliesI have a web application with several MSChart and I need print all these chart but I dont know how. In some examples in the internet people using EditCopy() but it dont working for me because I cant found that method.
View 17 RepliesI would like to customize the labels on the datapoints below so they would render as (using first datapoint on the chart as an example) :
4:10 - 4:40
yellow class
Got the MSChart working fine in a standard view, but I'm trying to put them on partial views that I'm then loading using jQuery tabs.
Problem is if you try to put the Chart on a partial, it moans about System.Web.UI.DataVisualization, saying it can't find it, no problem on a standard view though.
Can you use the new Microsoft Chart Control for .NET Framework inside a usercontrol? Bacause when i take a working chart from my page and then copy it to a usercontrol the picture is blank very weird.
View 1 RepliesI want to do a Jquery POST and get a chart using renderControl attribute of CHart which will return HTML attributes back to browser. The CHart is created dynamically based on parameters passed from post and from model. I have successfully done this on WEbforms,
However the same with MVC give a empty image. The handler doesn't perform the same in MVC2 3.5. I went near to 50 sites now.
I can't use other solution like base64encoding as IE6, 7 don't support it.
What I'm trying to do? I have few data parameteres to be sent (POST) to server and in response get the Chart image as tag along with other attributes and data appended in HTML form and sent to browser, all this to be done using JQUERY. No postbacks to be used.
I have badly searched on google, bing nothing turns out to be valuable.
I have installed the asp.net MSChart control for VS2008 and set up a chart on my webform. I am using DataBindTable in code to bind data from a LINQ query. The data for the x axis looks something like this:
Date/Time
15/03/2010 08:00:00
15/03/2010 14:00:00
15/03/2010 20:00:00
16/03/2010 08:00:00
16/03/2010 14:00:00
etc
When the chart displays the X axis only displays multiple dates, and not times, no matter what properties I try to change.
We are using MSChart on an ASP.net 3.5 web application and noticing significant slowness from enabling tooltips. the performance of drawing a chart is increased by 1,000-2,000ms.The chart output is PNG, and contains in total 108 data points.
View 1 RepliesI need the capability to display a chart, click on a region and display the details in a jqgrid on the same page. I tried using a pie Chart and I can't seem to capture or create a click event for the chart. The data points contain a .url property which I can redirect to a different page but I need to display details on the same page like a master-detail page.
View 3 RepliesHow can I display a TimeSeries?Is it possible to use the MSChart Control (Asp.net Charting Control)?
View 3 RepliesI have an mschart control which is databound in code-behind. The Y axis values can vary from vary small to very broad. So the range is set to auto. This works fine except when the values in range of 0 and <1.
In this range the axis only has a zero, it does not have a "1" at top. Is it possible to set to dynamically set the maximum? So if the maximum value is less than one, still show a one.
i.e. get maximum value and set the Y axis maximum = maximum value +1
I tried to place 4 mschart controls on the same page but it is giving me major grief. Each chart appears properly when I place one per page, but as soon as I place multiple the first two are displaying incorrect data and the last two do no display anything at all.
I made sure that I am not using the same session variable eventhough that seems to be the most like culprit.
using Mschart on my MVC project,when i use the first index page of project to render for the partial view name index2 the code is
<% Html.RenderPartial("Index2"); %>
But when i run it the error is occur which the message is
CS0029: Cannot implicitly convert type 'ASP.views_home_index2_ascx' to 'System.Web.UI.Page'
-it said that the problem line of code is
: // Render chart control
Line 52: Chart2.Page = this;
[code]...
But when i put all of code in Index2.ascx to the index.aspx and not to render the partial view it work fine
Code of Index2.ascx is
<%
System.Web.UI.DataVisualization.Charting.Chart Chart2 = new System.Web.UI.DataVisualization.Charting.Chart();
Chart2.Width = 412;
Chart2.Height = 296;
[code]...
I'm using the MSChart Control in a Web Project. I saw that there are 3 different storage mode settings: file/memory/session. I couldn't find any information about the pros/contras or the impact of the settings.
View 2 RepliesI am using the .net 3.5 chart controls and I am binding a chart to a datatable datasource. How do you keep the charts displayed after a postback has ocured. I bind my chart control. The on the page i make a change to a dropdownlist that issues a postback to the server. When the page reloads the charts have no data. How can you make the chart object persist it's data during postback?
View 1 RepliesDoes anyone have an example of using MSChart with a stored procedure? I have a chart control on the web page and have bound it to the stored procedure. I have also set the parameters for the stored procedure. However nothing shows in the chart. All the examples I can find only show adding points one at a time, but this seems to defeat the purpose of binding the chart to the stored procedure.
Some of the problems I am trying to solve:
The stored procedure returns about 6 columns of data. I only need to use two of them. How do I select which of the columns will be displayed in the chart?
I want to use two or more series on the chart. Do I have to run a separate stored procedure for each series or can I make one call to the stored procedure and then display the data in the two series? If so, how?
I am using VS 2008, MS SQL Server 2008, .Net 3.5 and VB .Net.
I have an MsChart with 6 series. The data is retrieved from MySQL database and every series has different number of elements.
The X axis is represented by date values (YYYY-MM). I am sorting data ASC on date from MySQL query but when i generate the chart i have the values (from left to right) : 2010-01 , 2011-04, 2013-04, 2011-04,2012-04.
I tried sorting data like this , for every series:
Code:
Chart1.Series(0).Sort(PointSortOrder.Ascending, "X")
But still no effect. How can i sort data on X axis?
Suppose if DB table has x-axis values as below for particular Id: 65 67.5 68.5 70.0 78.5 80.0 81.5 82.5 83.0 83.5 84.0 84.5 85.5 86.5
Then it should select x-axis Min value as 65 (for that particular Id), in below line: //Chart1.ChartAreas["ChartArea1"].AxisX.Minimum and it should select x-axis Max value as 86.5 (for that particular Id, in below line: //Chart1.ChartAreas["ChartArea1"].AxisX.Maximum.These values differ everytime for different Id. ( particular Id has multiple x-So everytime for particular Id, it should take x-axis Min and Max value from Database.I tried below code, but its not working. (Also this code enables MajorGrid = true dont know how. I had set it Enable = false from code behind.)
string query = "SELECT max(x) from Tables where Param_ID= '" + id + "' and DeletionDate is null";
DataTable dt2 = GetData(query);
Chart1.ChartAreas["ChartArea1"].AxisX.Maximum = Convert.ToDouble(dt2);
I am want show the MSChart in the Gridview Item Template,When i put the MSChart control in the Gridview Itemtemplate the Gridview does not render rhe MSChart,It says " There was error in rendering the contol,object reference not set to an instance of an object.
View 3 RepliesI would like to install my asp .net site on a free host. what do I need to install in order that the mschart control will work on the host.
what are the basic requirements.
at the moment I get an error about it.
MSCharts is displaying a period (.) instead of a comma as a thousands separator on my y-axis despite my culture settings in web.config being set to "en-AU". How can I fix/debug this?
View 1 RepliesI am wondering if I am able to align y-labels at chart if I am using MSchart control. I searched at google, but I got feeling it is not possible to align them, just title of y-axis.
Here snip of the chart if my question is not clear enough: [URL]
I've created a pie chart with several slices from a databind with a database. now i want to be able to click on a slice and show the values behind the clicked slice from the database in a gridview.
View 2 RepliesI've add MSChart to a webpage and I'm also using a Survey page I got from 4GuysFromRolla (http://www.4guysfromrolla.com/articles/061604-1.aspx). Both work on my development machine but when I move them to my hosting site there are issues.
With MSChart page the chart is not displayed although it's included the Page Source code:
src="/ClubInformationTracking/ChartImg.axd?i=chart_3d90c53b0f844807a2491a1d79a636a1_0.png&g=75fecf0f14cf4121b623691d383263aa" alt="" style="height:300px;width:700px;border-width:0px;" />
And when I try to open the Survey page I get this:Parser Error Message: Could not load file or assembly 'sstchur.web.survey' or one of its dependencies. The system cannot find the file specified.
Source Error:
<%@ Register TagPrefix = "sstchur" Namespace = "sstchur.web.survey" Assembly = "sstchur.web.survey" %>
<%@ Page Language = "C#" %>
Assembly Load Trace: The following information can be helpful to determine why the assembly 'sstchur.web.survey' could not be loaded.
WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLMSoftwareMicrosoftFusion!EnableLog].
The Hosting site is using Version 4.0 and the dll needed for the survey is in the BIN directory.
When I moved my files to the hosting site I had to change every instance when I referred to a file from:
"~/FileName"
To
"FileName"
I've tried all of the "fixes" I could find for the MSChart that involved changes to the web.config file but because of the error messages associated with the Survey page I'm guessing this is the issue.
i am using mschart in vs2008 in that i want set our own color for each datapoint using c#. This for the pie chart etc.. and also if there is no data for data point i want point out that field in unique color.
View 3 Replies