It sounds like you're looking for engineering formatting with SI units. There is no direct support for this in the Measurement Studio 7.0 version of the graph, but you could get the desired appearance in the axis by setting the axis.MajorDivisions.LabelVisible, axis.MajorDivisions.TickVisible, and axis.MinorDivisions.TickVisible properties to false, then adding custom divisions to the axis.CustomDivisions collection with the appropriate values and labels. This could be done at design-time, but here's some sample code that demonstrates how to do this at run-time:
class MyForm : Form
{
private NationalInstruments.UI.WindowsForms.WaveformGraph waveformGraph1;
private NationalInstruments.UI.XAxis xAxis1;
private NationalInstruments.UI.YAxis y
Axis1;
private NationalInstruments.UI.WaveformPlot waveformPlot1;
// ...
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
xAxis1.MajorDivisions.LabelVisible = false;
xAxis1.MajorDivisions.TickVisible = false;
xAxis1.MinorDivisions.TickVisible = false;
xAxis1.Range = new Range(10, 10000000);
xAxis1.ScaleType = ScaleType.Logarithmic;
xAxis1.CustomDivisions.Add(new AxisCustomDivision(10, "10Hz"));
xAxis1.CustomDivisions.Add(new AxisCustomDivision(100, "100Hz"));
xAxis1.CustomDivisions.Add(new AxisCustomDivision(1000, "1kHz"));
xAxis1.CustomDivisions.Add(new AxisCustomDivision(10000, "10kHz"));
xAxis1.CustomDivisions.Add(new AxisCustomDivision(100000, "100kHz"));
xAxis1.CustomDivisions.Add(new AxisCustomDivision(1000000, "1MHz"));
xAxis1.CustomDivisions.Add(new AxisCustomDivision(10000000, "10MHz"));
// Axis should now appe
ar as specified once the form loads.
}
}
- Elton