Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search


C# - .NET Chart Control - Dynamically Change Y-axis Interval?

I have a bar graph displaying a number of different series (stacked on each other) and I'm trying to find a way to dynamically change the y-axis interval if the values go above a set value.

If the bars only go up to a maximum of 50, I'd like the interval to be 25 so the bars still 'look' rather small. But if a large spike comes through, the interval needs to be set to 0 so the large spike is more noticeable.

View 1 Replies (Posted: Feb 10 at 5:35)

Sponsored Links:

Related Forum Messages For ASP.NET category:
Forms Data Controls :: How To Freeze The X Axis Of The Chart Control In Ms Chart
how to freeze the x axis of the chart control in ms chart? need to use because data displayed at large amount that is scrollable.

Posted: Feb 24, 2010 08:21 AM

View 1 Replies!   View Related
Forms Data Controls :: Chart - Display X Axis And Y Axis Values As Sum?
Iam having  simple chart.

Which is displaying X and Y values.

Iam using SqlDataSource control to Bind data from database.

Now, How to display Sum of X values on top of  chart ?

Posted: Mar 30, 2011 07:15 AM

View 1 Replies!   View Related
C# - How To Turn Off The X-axis Labels In A Chart Control
I want to programmatically turn on/off the labels on an Chart Control.

The chart is for a load of stats, by person, and I want to be able to anonymise it by removing the labels.

Can this be done from the Chart Control, or do I need to do it at the underlying data-table?

Posted: Jan 31 at 10:13

View 1 Replies!   View Related
VS2010 Chart Control: Reducing Y-Axis Margin?
How do I reduce the width of the left margin area shown below, marked in red?

Posted: Nov 1 10 at 17:11

View 1 Replies!   View Related
Forms Data Controls :: Formatting Axis Of A Chart Control?
I am working with a chart control and on the Y axis i have numbers that fall between millions and billions.

The numbers on the axis themselves are not formatted and as such can be difficult to read. I wanted to know if there was a way for me to format the value that appears on the axis itself to be coma seperated? 

here's what the Y axis looks like



numbers are just hard to read. How do i format them with coma's or even add a label saying (Millions) and then displaying only 100, 300, 600 etc

Posted: Jun 29, 2010 10:51 PM

View 5 Replies!   View Related
Forms Data Controls :: Ms Chart Control Zoom In On Axis?
I have a .net3.5 mschart control bound to a data table displaying a line graph. I wigh to zoom in on an axis on an web form.

Posted: Aug 11, 2010 03:41 PM

View 1 Replies!   View Related
Visual Studio 2010 Chart Control: Make Y Axis An Integer Value, Not Decimal?
I like the way that the chart control seems to automatically determine the X axis range for me based on the data, but in this case, the data can only be whole numbers.

What is the easiest way to specify whole numbers for this axis?

Posted: Nov 1 10 at 13:46

View 2 Replies!   View Related
Forms Data Controls :: Chart Control Not Showing All Points' Labels On X-axis?
I'm using an asp:Chart control and am dynamically creating a single series.


 where pointNames is a string array and value is an int.

 The chart displays correctly, but only some of the points' names show.

Here are all the series properties I set:


Posted: Mar 25, 2009 08:59 PM

View 6 Replies!   View Related
MS Chart Type "column" Not Showing Axis X Label If There Are More Than 9 Bar In The Chart
I'm having problem with MS Chart chart type column. If there are only 9 bar in the chart like the following picture, then the axis-x label show up properly.

However, there are more than 9 bars bar the chart, the axis-x label wont show up properly, some of them just dissappear.

Here's my mark-up for the chart:


I don't know it works with only 9 bars? Is there any way to make the chart work properly? Also, if possible, how to make each bar have different color.

Posted: Mar 12 10 at 20:08

View 5 Replies!   View Related
Web Forms :: MS Chart Tooltips In AXIS?
I am trying to put different tooltips in my MS chart (No in the points) I want these tooltips in my values in axis and I cannot do it. 

Posted: Jul 26, 2010 01:39 PM

View 3 Replies!   View Related
C# - Adjusting The Xy Axis In Point Chart
How do you adjust the formatting of the point chart? I'd like to dynamically set maximum and minimums based on data in a List<>. I'd also like to figure out the properties that allows me to tweak the intervals within each of the axes and also formatting the labels so that I can change decimals to percentages.

Posted: Aug 23 10 at 5:52

View 1 Replies!   View Related
Chart Controls X-axis Showing Weeks?
I have this problem with a chart, it should display values for individual weeks, this is no problem when the data displayed if from one year.

However, if the period is starting from say, 30th of november 2009 it will display weeks for 2009 and 2010.

The problem is that the last week of 2009 can be 52 (or 53), and then it's 1 and should take off from there. 

So, it's not a increment every time. I've only found the AxisX.Maximum and AxisX.Minimum and by these I can't do what I want.

Posted: Jun 15, 2009 01:40 PM

View 1 Replies!   View Related
Forms Data Controls :: Chart X Axis Is In Time?
My application work in this ways. I got a database collect data from 20 sensors. Database holds Temperature and DateTime data/Records from sensors. So i would like to make it whenever i view the chart, it will plot a line chart one by one according to the temperature and timestamp(DateTime). Which mean my X axis is a colleborate time on that particular date.I already design a in the way that the line chart will plot base on both dropdownlist, Sensor ID and Date. So it will work like whenever i select a Date or ID it will read the records from database table temperature.

Posted: Aug 19, 2010 03:19 AM

View 9 Replies!   View Related
Forms Data Controls :: MS Chart Series X Axis Not Lining Up?
I have 2 series in the same chartarea.  Both contain values by year (x axis).  The problem is if one series does not have data for a given year, the chart will display the first value in a series on the first tick mark whether it matches the xaxis label or not.



Notice the 2009 value for series1 appears in the first column and the Xaxis now has 2 2009 tick marks.  How do I get the values to appear on the correct X axis marks?

Posted: Sep 17, 2010 03:09 PM

View 4 Replies!   View Related
Forms Data Controls :: Chart - X Axis Doesn't Show All Names
I´ve got a chart control (column type) and must show many elements at y axis, but when system generates the chart draw, it´s shows only odd elements: For example: My chart must show a colunm containing systems (x) and error incidences (y):


But it´s only shows:


I must set a parameter that forces "all" series to be showed.

Posted: Nov 17, 2010 02:51 PM

View 2 Replies!   View Related
Forms Data Controls :: Chart Setting Number Of Points On Y Axis?
I am currently using the new chart control.In this control i am not setting the maximum, minimum and the interval value because they are dynamic.ow once the graph is populated from database, the is only generating 4-5 points on the y -axis, i want it to show at least 10 values.But i am not sure how to increase the number of points on Y & X Axis. 

Posted: Feb 17, 2011 11:00 AM

View 1 Replies!   View Related
Forms Data Controls :: Creating Date Formatted Custom Labels For Chart X-axis?
I am trying to create a chart with three x-axis labels where the chart series x-value member is a date. That is, each data point is a day returned from a SQL Server table.  The first label row is to be the day component, the second label row the month name component and the third label row the year.  The returned dataset can be from any time period and of varying length. It needs to look like below so each day can be seen but the bigger picture is also shown.

x-axis label(0):   26 27 28 29 30 31 1  2  3  4  5  6

x-axis label(1):      March                       April

x-axis label(2):                       2010

I can set the first row using the design time properties as such


I am not sure how to create the next to custom labels at runtime.  I have gone through the options using Add(Double, DateTimeIntervalType, Double, Double, String, Int32, LabelMarkStyle) and Add(Double, DateTimeIntervalType, String, Int32, LabelMarkStyle) but I just cannot get them to appear in the chart label.

I tried the other method

however could not find how to set the DateTimeIntervalType on the CustomLabel object.

There was nothing in the ChartSamples and I am not even sure if it can be done.

Posted: Aug 13, 2010 11:30 AM

View 2 Replies!   View Related
Web Forms :: Want To Be Change In Regular Interval?
've using adrotator in my web page store few images using xml file .The problem is only image change when refresh but i want to be change in regular interval.

Posted: Jan 22, 2010 06:04 AM

View 5 Replies!   View Related
Forms Data Controls :: Creating Custom Axis Format For Chart Controls?
i created a chart in Excel, but now I am having the time of my life to create the same chart in a control.

If you can see on the bottom I have converted the labels to percentages.

In excel I am using a series of data cells to create the bottom labels (0-8 with a .5 increment).

The Y-axis is done with a fixed maximum value of 2 and the labels are percentages as well.  How do I get those same axes on the chart control?

Posted: Jun 07, 2010 07:56 PM

View 1 Replies!   View Related
Web Forms :: How To Change Pictures And Text At Given Interval
 I have an asp image and need to put text over it.  Together the image url and text need to change every 10 or 15 seconds.  I tried an AJAX timer, but my AJAX is messed up.  Either I get an error on Script Manager and Update Panel, or if I fix the error (change the web.config) then my page never loads.  I wanted to know if there is another option for me??

Posted: Oct 30, 2009 01:46 AM

View 6 Replies!   View Related
Change The Image In An Interval Of 60 Seconds Automatically?
i have an image in my page, how can i change the image in an interval of 60 seconds automatically.

Posted: Aug 18, 2009 06:47 PM

View 26 Replies!   View Related
Forms Data Controls :: Asp:Chart Control Loading Dynamically?
I can't figure out how to get the legend to populate all the "strReason" and get the correct percents to show for each column.  This is where I'm at right now.


Posted: Dec 16, 2010 03:01 PM

View 1 Replies!   View Related
How To Change The Default Colors Of The Pie Chart When Using Chart Helper
Is it possible to specify what color each section of the pie looks like? Also, is it possible to display the legend on the side?

For ex: in the chart below, can I some specify that , "Pass" shows up as green, Fail as red and unknown as grey?

public ActionResult GetRainfallChart()
var key = new Chart(width: 600, height: 400).AddSeries(
chartType: "pie",
legend: "Test pass",
xValue: new[] { "Pass", "Fail", "Unknown" },
yValues: new[] { "50", "30", "20" })
return null;

If its not possible with the "chart" control that comes in System.Web.Helpers assembly, then can someone point me how to do this with control for webforms in a MVC project

Posted: Jan 28 at 6:32

View 3 Replies!   View Related
Web Forms :: Display Time On Y Axis And Days On X Axis?
I want to display time on Y axis and days on  x axis.

I want to dispaly 12:00 AM,11:00 AM...11:59 PM. on Y axis.I want function to create sequence like that and on X axis display week like 6-sep,7-sep,..11-sep.

Posted: Sep 06, 2010 04:45 AM

View 6 Replies!   View Related
Forms Data Controls :: Programmatically Creating Chart Control And Adding It To Dynamically Generated Table?
I am stuck in chart controls...Here is my prob... There is a ListBox containing some items...when user selects multiple items from the list box I want to generate a dynamic table with the number of columns same as that of the number items selected in the listbox. And for each selected item I want to show a seperate chart in the columns...Currently I want the same chart control for every selected item (i.e. a static hard coded chart that i will replace later by dynamic values)....I am using a method that draws a chart control using a sample dataset... I am calling it each time when a new column is created..Also the DrawChart method executes for the first column only and throws an index out of range exception! after the first code is not

my code...



Posted: May 21, 2010 01:22 PM

View 1 Replies!   View Related
AJAX :: How To Set The Interval For A Timer Control Which Is Inside A Update Control
Basically I am trying to execute this code:


ERROR:Error 1 Cannot create an object of type 'System.Int32' from its string representation 'Convert.ToInt32(ViewState["RefreshInterval"])' for the 'Interval' property.

Posted: Oct 19, 2010 04:31 PM

View 6 Replies!   View Related
Forms Data Controls :: Using Dot Net Chart Control Last Column Of Chart Is Not Completely Appearing?
I have an issue in using dot net chart control. In chart last column is not completely shown which give bad appearance and on right side of chart it looks like TickMark are enabled. I set  MajorTickMark of AxisY2 disabled but still tick marks on right side. 

Posted: Jul 09, 2010 07:23 AM

View 2 Replies!   View Related
Forms Data Controls :: .net 4 Chart Control - Hide Labels In Pie Chart?
Am I going mad/blind? Probably a combination of the two.

How does one go about removing the data labels from a pie chart with the new chart control in .net 4?

I can get these to display as tooltips absolutely fine, but ultiamtely I'd like the labels not to be present as it looks rather busy.

I've searched previous answers and seen code behind resolutions but surely there must be some sort of code infront option to turn these labels off?

Posted: Apr 28, 2010 10:22 AM

View 2 Replies!   View Related
Forms Data Controls :: Pie Chart Size In Charting / Using MS Chart Control (3.5)?
I am using MS Chart control (3.5), and have a requirement where I need to display 2 pie charts. The datapoints for the pie charts is set programatically. My doubts are as follows:

1. Can I display both the pie charts in a single chart control and area, or do I have to use two controls? (Currently I am using two controls)

2. How can I maintain the same size for both the pie charts? This is my main concern, since the pie sizes keep changing, depending on the number of datapoints. I tried using custom properties like "MinimumRelativePieSize", but it's not working.

Posted: Aug 12, 2010 03:56 PM

View 1 Replies!   View Related
Forms Data Controls :: Creating Stacked Bar Chart From VS2010 Chart Control (Documentation)
i'm trying to create a stacked bar chart on a vb web form using vs2010.My data source returns:

 Error in Functionality Awaiting on Supplier

1IMT IssuesmActive6

IMT Issues,Awaiting on Supplier

2,IMT Issues,Awaiting on User 4

IMT Issues Closed 120
Login / Password Active

But I can't get this into a stacked chart. I know I must have to do quite a bit of work declaring what the series are and soforth, or having a different dataset but can't find any documentation on it.A link to some documentation or an example of a stacked chart from an sql datasource would be much appreciated.

Posted: Nov 17, 2010 11:29 AM

View 1 Replies!   View Related
Forms Data Controls :: Chart Control Tooltip On Pie Chart Not Updating On Partial Postback?
I started using the awesome chart controls with my apps recently and so far they've been nothing short of breath taking. Right now I have a weird problem, on the first load of my page, the chart control appears correctly and the tooltip is correct, however, when I update it with new data, the chart displays correctly, but the tooltips are for the previous set of data.

I hope this makes sense. The first time I load the chart,  the pie chart segments and tooltips are correct, after a partial postback (to get the new data), the pie chart segments are correct but the tooltips are for the previous data set.

Basically once the tooltips are set the first time, they can't be updated after that without a full page postback.

Here's how I set the tooltip:


Anyone else noticed this behaviour and have a work around?

Currently my only workaround is to check for a partial postback and not render the tooltip, which I'd rather not do as the tooltip display actual statistical data as opposed to the pie itself (which uses percentages).

Posted: May 21, 2010 09:27 AM

View 2 Replies!   View Related
Web Forms :: How To Make Scatter Plot Chart With X Y Using Chart Control
I have X and Y data columns coming from database.

I have to show scatter plot chart with Linear, Exponential, Log, power using chart control.

How to do that?

Posted: Jul 19, 2010 02:59 AM

View 2 Replies!   View Related
C# - MS Chart Control Pie Chart: Remove Unwanted Padding
im trying to create simple pie chart using the MS Chart controls. When my pie chart gets rendered in the browser i get padding around the pie chart that i cant get rid of. i would like the pie chart to sit up against the edge of the image with no padding or margin. in my code below the padding is highlighted in blue. i.e Chart1.BackColor = System.Drawing.Color.Blue;

<script type="text/C#" runat="server">
protected void Page_Load(object sender, EventArgs e)
//Set the chart type
Chart1.Series["Series1"].ChartType = SeriesChartType.Pie;
//add points
//set back color of chart object
Chart1.BackColor = System.Drawing.Color.Blue;
//set back color of chart area
Chart1.ChartAreas["ChartArea1"].BackColor = System.Drawing.Color.Green;
<asp:Chart ID="Chart1" runat="server">
<asp:Series Name="Series1" ChartType="Pie">
<asp:ChartArea Name="ChartArea1">

Posted: Jun 7 10 at 10:50

View 1 Replies!   View Related
.net - Change The Id Of Control Within The Repeater Dynamically?
I have linkbutton within the repeater. The ID of the repeater is "lnkbtn".

I have a datatable containing a column called as "Questionnumber".

The "Questionnumber"(column) contains records such as 1,2,3,16, on.

I want to set the ID of the linkbutton dynamically.This id must be respective to the "Questionnumber".

if i set ID of the linkbutton(within repeater) as ID='<%# Eval("Questionnumber") %>' , i face problem when i intend to write the coding as repeater1.Items[].Findcontrol("lnkbtn")

Posted: Nov 3 10 at 6:18

View 2 Replies!   View Related
C# - Multiple Chart Series In Chart Control?
I am a novice programmer using ms chart control for my dashboard, I have a problem displaying chart series.

Here is my sample query & result

Sample Query: "SELECT Brand, sales, Manufacturer From TABLE"

Sample Result:


How can I display BrandA for XValueMember & Salesvalue(10000) for YValueMembers as Series1 having a column chart type.

And to display BrandY & BrandZ for XValueMember ; Salesvalue for YValueMembers as Series2 having a line chart type.

I want my chart to have 2 Y-axis; Series1 for primary Y-axis & series2 for secondary Y-axis.

My problem here is how can I display BrandA in Series1 and BrandY,BrandZ in Series2 where the values are in the same field?

Or is it possible to set more than one data source for the chart control?

I've been working on this for two days but I wasn't able to get the desired result.

Posted: Jan 5 at 7:41

View 1 Replies!   View Related
Web Forms :: Change HTML - Control Table's Background Dynamically
i have n ASP .net page containing a HTML-control  Table (LoginTable) with a background image,  i want to change the background image. the Asp page has have a masterpage also. the code i am using is,

ContentPlaceHolder Cphmain = (ContentPlaceHolder)Page.Master.FindControl("CpHMain");
HtmlTable htmlTable = Cphmain.FindControl("LoginTable")

The find control method is returning null value

Posted: Jan 06, 2010 10:27 AM

View 2 Replies!   View Related
Chart Control - Pie Chart - Text Around / Outside?
I am having a requirement, where I need to have a pie-chart, i need text around pie-chart , the text should be a hyperlink. Ex: we have 3 three fields A,B,C. A's ratio is 30%, B's ratio is 40%, c's ratio is 30% So pie chart gets divided into 3 parts, outside the graph , we should get the label A(in A's area only), when we point on , tool tip should say "A's ratio is 30 %'. I am working in .Net 3.5, VS 2008, using MS chart control(added explicitly by executing MSChart.exe.

Posted: May 13 10 at 11:15

View 1 Replies!   View Related
How To Create Multi Series Chart Dynamically
I want to create multi series chart in dynamically.I am new one for this concept.

Posted: Mar 18 10 at 3:51

View 1 Replies!   View Related
Web Forms :: Way To Dynamically Adding A DataList Item And Chart
I'm trying to add a DataList to a panel and add a chart to the DataList.


Posted: Jul 21, 2010 01:16 PM

View 1 Replies!   View Related
Copyright © 2005-08, All rights reserved