Sonagram View3d.Dimensions. Relating to the sonagram demo
Posted: Tue Mar 18, 2014 3:04 pm
I have a goal to stack multiple sonagram sufraces into the same chart.
As a newcomer to the charts, my first goal was this: I want a sonagram with no bottom axis, that uses 100% of the vertical space.
My starting point was the sonagram example, and I got to the 'MaximizeViewport' function.
I cant figure out what the dimension values actually are? They're not size in pixels, they're not starting XY in pixels, they're not percentages....
How do I say 'Maximize the vertical space completely'? (I have the axis invisible)
The function is:
const float XMarginPixels = 60f;
const float ZMarginPixels = 60f;
theChart.View3D.Dimensions.X = (float)theChart.View3D.Dimensions.Z / (((float)theChart.Width - 2f * ZMarginPixels) / ((float)theChart.Height - 2f * ZMarginPixels));
theChart.View3D.Dimensions.Z = 200f * ((float)theChart.Width - 2f * XMarginPixels) / (float)theChart.Width;
var str = string.Format("X is {0:00000}, Z is {1:00000}{2}", theChart.View3D.Dimensions.X, theChart.View3D.Dimensions.Z, Environment.NewLine);
Debugger.Log(0, "A", str);
I'm getting values like 40 for x, and 160. They seem to be correctly proportional.
A followup question: I would like my vertical axis to scale depending on the charts size. I want it to always display the same range of values, and it seems to be clipping the chart instead of scaling.
Thanks!
As a newcomer to the charts, my first goal was this: I want a sonagram with no bottom axis, that uses 100% of the vertical space.
My starting point was the sonagram example, and I got to the 'MaximizeViewport' function.
I cant figure out what the dimension values actually are? They're not size in pixels, they're not starting XY in pixels, they're not percentages....
How do I say 'Maximize the vertical space completely'? (I have the axis invisible)
The function is:
const float XMarginPixels = 60f;
const float ZMarginPixels = 60f;
theChart.View3D.Dimensions.X = (float)theChart.View3D.Dimensions.Z / (((float)theChart.Width - 2f * ZMarginPixels) / ((float)theChart.Height - 2f * ZMarginPixels));
theChart.View3D.Dimensions.Z = 200f * ((float)theChart.Width - 2f * XMarginPixels) / (float)theChart.Width;
var str = string.Format("X is {0:00000}, Z is {1:00000}{2}", theChart.View3D.Dimensions.X, theChart.View3D.Dimensions.Z, Environment.NewLine);
Debugger.Log(0, "A", str);
I'm getting values like 40 for x, and 160. They seem to be correctly proportional.
A followup question: I would like my vertical axis to scale depending on the charts size. I want it to always display the same range of values, and it seems to be clipping the chart instead of scaling.
Thanks!