public DVAxisAggregate(RecordStream rs, ChartRecordAggregate container, AxisRecord axis) : base(RuleName_DVAXIS, container) { if (axis == null) { this.axis = (AxisRecord)rs.GetNext(); rs.GetNext(); } else { this.axis = axis; } if (rs.PeekNextChartSid() == ValueRangeRecord.sid) { valueRange = (ValueRangeRecord)rs.GetNext(); } if (rs.PeekNextChartSid() == YMultRecord.sid) { axm = new AXMAggregate(rs, this); } axs = new AXSAggregate(rs, this); if (rs.PeekNextChartSid() == CrtMlFrtRecord.sid) { crtmlfrt = new CrtMlFrtAggregate(rs, this); } Record r = rs.GetNext();//EndRecord Debug.Assert(r.GetType() == typeof(EndRecord)); }
public void TestStore() { ValueRangeRecord record = new ValueRangeRecord(); record.MinimumAxisValue = (0); record.MaximumAxisValue = (0); record.MajorIncrement = (0); record.MinorIncrement = (0); record.CategoryAxisCross = (0); record.IsAutomaticMinimum = (true); record.IsAutomaticMaximum = (true); record.IsAutomaticMajor = (true); record.IsAutomaticMinor = (true); record.IsAutomaticCategoryCrossing = (true); record.IsLogarithmicScale = (false); record.IsValuesInReverse = (false); record.IsCrossCategoryAxisAtMaximum = (false); record.IsReserved = (true); byte[] recordBytes = record.Serialize(); Assert.AreEqual(recordBytes.Length - 4, data.Length); for (int i = 0; i < data.Length; i++) { Assert.AreEqual(data[i], recordBytes[i + 4], "At offset " + i); } }
private static ValueRangeRecord CreateValueRangeRecord() { ValueRangeRecord r = new ValueRangeRecord(); r.MinimumAxisValue = (0.0); r.MaximumAxisValue = (0.0); r.MajorIncrement = (0); r.MinorIncrement = (0); r.CategoryAxisCross = (0); r.IsAutomaticMinimum = (true); r.IsAutomaticMaximum = (true); r.IsAutomaticMajor = (true); r.IsAutomaticMinor = (true); r.IsAutomaticCategoryCrossing = (true); r.IsLogarithmicScale = (false); r.IsValuesInReverse = (false); r.IsCrossCategoryAxisAtMaximum = (false); r.IsReserved = (true); // what's this do?? return(r); }
public void TestLoad() { ValueRangeRecord record = new ValueRangeRecord(TestcaseRecordInputStream.Create(0x101f, data)); Assert.AreEqual(0.0, record.MinimumAxisValue, 0.001); Assert.AreEqual(0.0, record.MaximumAxisValue, 0.001); Assert.AreEqual(0.0, record.MajorIncrement, 0.001); Assert.AreEqual(0.0, record.MinorIncrement, 0.001); Assert.AreEqual(0.0, record.CategoryAxisCross, 0.001); Assert.AreEqual(0x011f, record.Options); Assert.AreEqual(true, record.IsAutomaticMinimum); Assert.AreEqual(true, record.IsAutomaticMaximum); Assert.AreEqual(true, record.IsAutomaticMajor); Assert.AreEqual(true, record.IsAutomaticMinor); Assert.AreEqual(true, record.IsAutomaticCategoryCrossing); Assert.AreEqual(false, record.IsLogarithmicScale); Assert.AreEqual(false, record.IsValuesInReverse); Assert.AreEqual(false, record.IsCrossCategoryAxisAtMaximum); Assert.AreEqual(true, record.IsReserved); Assert.AreEqual(42 + 4, record.RecordSize); }
public void TestStore() { ValueRangeRecord record = new ValueRangeRecord(); record.MinimumAxisValue=(0); record.MaximumAxisValue=(0); record.MajorIncrement=(0); record.MinorIncrement=(0); record.CategoryAxisCross=(0); record.IsAutomaticMinimum=(true); record.IsAutomaticMaximum=(true); record.IsAutomaticMajor=(true); record.IsAutomaticMinor=(true); record.IsAutomaticCategoryCrossing=(true); record.IsLogarithmicScale=(false); record.IsValuesInReverse=(false); record.IsCrossCategoryAxisAtMaximum=(false); record.IsReserved=(true); byte[] recordBytes = record.Serialize(); Assert.AreEqual(recordBytes.Length - 4, data.Length); for (int i = 0; i < data.Length; i++) Assert.AreEqual(data[i], recordBytes[i + 4], "At offset " + i); }
private ValueRangeRecord CreateValueRangeRecord() { ValueRangeRecord r = new ValueRangeRecord(); r.MinimumAxisValue = (0.0); r.MaximumAxisValue = (0.0); r.MajorIncrement = (0); r.MinorIncrement = (0); r.CategoryAxisCross = (0); r.IsAutomaticMinimum = (true); r.IsAutomaticMaximum = (true); r.IsAutomaticMajor = (true); r.IsAutomaticMinor = (true); r.IsAutomaticCategoryCrossing = (true); r.IsLogarithmicScale = (false); r.IsValuesInReverse = (false); r.IsCrossCategoryAxisAtMaximum = (false); r.IsReserved = (true); // what's this do?? return r; }
private ValueRangeRecord CreateValueRangeRecord() { ValueRangeRecord r = new ValueRangeRecord(); r.SetMinimumAxisValue( 0.0 ); r.SetMaximumAxisValue( 0.0 ); r.SetMajorIncrement( 0 ); r.SetMinorIncrement( 0 ); r.SetCategoryAxisCross( 0 ); r.SetAutomaticMinimum( true ); r.SetAutomaticMaximum( true ); r.SetAutomaticMajor( true ); r.SetAutomaticMinor( true ); r.SetAutomaticCategoryCrossing( true ); r.SetLogarithmicScale( false ); r.SetValuesInReverse( false ); r.SetCrossCategoryAxisAtMaximum( false ); r.SetReserved( true ); // what's this do?? return r; }