473,394 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

don't want to show scale values of MSChart

hi all
i am using mschart in my programm to display graph of Time (x-axis) and Temprature(y-axis) values stored in the database .problem is that the when i have 50 or more values in the database, value on the x-axis gathered to much and look very bad and meaning less .

how can i hide the time values on the x-axis of the graph.
thanks in advance to all.
Oct 29 '06 #1
1 5908
hi all
i am using mschart in my programm to display graph of Time (x-axis) and Temprature(y-axis) values stored in the database .problem is that the when i have 50 or more values in the database, value on the x-axis gathered to much and look very bad and meaning less .

how can i hide the time values on the x-axis of the graph.
thanks in advance to all.

i had the same problem but i solve it
the code is:
MSChart1.Plot.UniformAxis = False

put that in your project ...wait i give u the full text

hen creating an XY Scatter chart using the MSChart control, the resulting chart may appear distorted; that is, very tall and narrow or very short and wide. This occurs on an XY Scatter chart whose axes have ranges that differ by a large amount. For example, an X axis with a range of 0 - 10000 and a Y axis of 0 - 50.

Back to the top
MORE INFORMATION
By default, the scale on the axes of an XY (Scatter) chart is uniform. If the x-values are small in comparison to the y-values, or vice versa, the chart may appear distorted. To allow the scaling of each axis to be independent, change the UniformAxis property of the Plot object to False. The default value of this property is True.

Back to the top
Step-by-Step Example
1. Start Visual Basic and create a new Standard EXE project. Form1 is created by default.
2. Click Components from the Project menu and check the "Microsoft Chart Control" component. The MSChart control is made available on the Toolbox.
3. Put an MSChart control on Form1.
4. Copy and paste the following code to the form's code window:

Private Sub Form_Load()
Dim Graph(1 To 10, 1 To 2) As Single
Dim x As Integer
For x = 1 To 10
Graph(x, 1) = x ' value for X-axis
Graph(x, 2) = x * 10 ' value for Y-axis
Next x
MSChart1.chartType = VtChChartType2dXY ' set to X Y Scatter chart
MSChart1 = Graph ' populate chart's data grid using Graph array
' Leave the following line commented until step 6:
'MSChart1.Plot.UniformAxis = False
End Sub



5. Press the F5 key to run the project. Note that the chart is not legible (tall and narrow) because both x and y axes are using the same scale and the y-values are larger than the x-values.
6. Stop the project and remove the comment on the last line of code.
7. Press the F5 key to run the project, and note that the chart is legible.
Apr 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: arc | last post by:
My web application is using MSChart for reporting. (until i port it to some decent reporting tool) How to make sure all the web clients (IE atleast) have MSChart on their system to view these...
1
by: Jaime Lucci | last post by:
Has anybody any documentation about MSChart? Thanks.
2
by: Jon Henry | last post by:
Hi, I have a question regarding using the MSChart control in Visual C# Standard 2003. I understand that you can add it to the Toolbox and use it like any other control-- the problem I'm having...
0
by: Richard | last post by:
When I try adding a MSChart control from the toolbox I get an error message telling me it can't find AxInterop.OWC10.dll. I was given the advice below but i'm not sure where to add the class...
2
by: John Blair | last post by:
Hi, In my webform HTML i have the following code, but i cannot view and configure this chart control in the code behind class. In the code behind class i have a reference to this com control...
9
by: senfo | last post by:
In my not so humble opinion, Server.Transfer() looks good on paper, but I have yet to come across a use for it that couldn't be accomplished better another way. When it comes down to it, I really...
130
by: Daniel Manes | last post by:
I'm baffled. I have a column in a SQL Server Express database called "Longitude," which is a float. When I view the table in a DataGridView, some of the numbers, which only have two decimal places...
4
by: j2flk1234 | last post by:
I finally figured out how to use MSChart, one thing I was wondering was whether it is possible to have an x y and z axis using this chart?
1
by: peterchance | last post by:
Hi I am using VB 6 with MSCHART. I have no problem plotting my graphs but cannot change the Axis Scale on the fly. I can change it from the Property Page in design mode by turning off automatic...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.