コード例 #1
0
        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));
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
ファイル: InternalChart.cs プロジェクト: zzy092/npoi
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
        }
コード例 #6
0
        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);
        }
コード例 #7
0
ファイル: HSSFChart.cs プロジェクト: 89sos98/npoi
 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;
 }
コード例 #8
0
ファイル: HSSFChart.cs プロジェクト: 89sos98/npoi
	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;
	}