[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

X/Y scaling with MSChart type 2dXY

Posted on 2009-07-03
2
Medium Priority
?
642 Views
Last Modified: 2012-05-07
VB6: My application produces an X/Y plot of data.  I am using MSChart type 2dXY.  The "autoscale" is enabled.

The X and Y axes evidently are scaled identically.  This means that, if the span of data for X, and that for Y, are not equal, the plot is not a square.

The span of data to be plotted varies.
My X data ranges from 0 to perhaps 1000.  My Y data typically goes from 0 to 100 or 200.
This produces a really "squished" picture.

I would like to specify the actual screen dimensions of the plot, no matter how the scale numbers are autoscaled.  Is this possible?

This is a simple plot, and it occurred to me that I could take the trouble to write the code to do my own plot.  But it would be easier to use MSChart, if I could force it to the screen dimensions I want.
0
Comment
Question by:NormaPosy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
BrianVSoft earned 2000 total points
ID: 24776325
Hi again,
I have used MSChart many times, but not for a few years.. I don't remember ever having a "squashed" aspect.. It always stretched the Y axis to fill the MyChart.Height dimension..
Check if you are able to achieve a good aspect by simply placing "MyChart.Height = xx" at the end of your fill routine?
I now use my own function to draw simple 2D - multi-line charts in Picture boxes.. It is less than 50 lines of code and can be used for a variety of situations.. I can attach a code example if you continue to have trouble..
0
 

Author Comment

by:NormaPosy
ID: 24776927
Yes.  Me too.  I have an old code I once wrote which I can dig up.  It acceped parameters for scaling, axis labelling, etc, and just drew the plot.

For general use, autoscaling is a bit tricky.  For specific data, the scaling can be "hard wred".

You are right about how 2dXY does it.  The Y axis fills the height, and the "inches per unit" for both axes are identical, which means the X axis length is a function of the data ratio.  Should be independant and under code control.

Thank you.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question