Fixed axis scale ratio

Jan 5, 2011 at 4:37 PM
Edited Jan 6, 2011 at 10:51 AM

Is there a way to enforce a certain ratio between the scale of the x-axis and the scale of the y-axis?

 

EDIT: I could solve my problem by using PhysicalProportionsRestriction and fixing a nasty bug in my code, thanks! -> thread can be closed

Jan 6, 2011 at 2:08 PM

can you please explain how you did this if it's not too much trouble?

(i.e. how you used the physical proportions restriction...

thanks...

Feb 8, 2011 at 6:40 PM

I also need to know how to do this. I searched the entire D3 project for PhysicalProportionsRestriction and found nothing. 

Can anyone explain how to do this? Thanks.

Feb 9, 2011 at 12:10 AM

It's there, in Source\Nightly\DynamicDataDisplay Sources v0.3.4703.0\src\DynamicDataDisplay\ViewportRestrictions\PhysicalProportionsRestriction.cs.

 

Feb 9, 2011 at 6:49 AM

Hi,

I figured out how to do this. It's pretty straightforward....

The plotter can hold a list of restrictions, e.g.:

<d3:ChartPlotter.Restrictions>
                                <d3:MaximalSizeRestriction MaxSize="75" />

</d3:ChartPlotter.Restrictions>

Each restriction can enforces some limit on some property, so you have to understand the property it limits in order to know which properties to set in the Restriction.

For example, the maximalsize restriction limits the dimension of the viewport to 75.

Feb 9, 2011 at 5:10 PM

In the version of D3 my app is using (that I have customized quite a bit), it is called a PhysicalProportionConstraint. That is why I couldn't find it.

Were Constraints replaced with Restrictions universally at some point in D3? Thanks.