Exemplo n.º 1
0
		void SetupAxes ()
		{
			int oneDay = 24 * 60 * 60;

			var plotspace = graph.DefaultPlotSpace;
			plotspace.AllowsUserInteraction = true;

			// Setup scatter plot space
			var plotSpace = (CPTXYPlotSpace) graph.DefaultPlotSpace;
			decimal xLow = oneDay * 0.5m;

			var plotRangeX = new CPTPlotRange ((NSDecimal)xLow, (NSDecimal)(oneDay * 5m));

			plotSpace.XRange = plotRangeX;

			var plotRangeY = new CPTPlotRange ((NSDecimal) 1, (NSDecimal) 3);


			plotSpace.YRange = plotRangeY;
			// Axes
			var axisSet = (CPTXYAxisSet) graph.AxisSet;
			CPTXYAxis x = axisSet.XAxis;
			x.MajorIntervalLength = oneDay;
			x.OrthogonalCoordinateDecimal = 2;
			x.MinorTicksPerInterval = 0;

			CPTXYAxis y = axisSet.YAxis;
			y.MajorIntervalLength = (NSDecimal)0.5;
			y.MinorTicksPerInterval = 5;
			y.OrthogonalCoordinateDecimal = oneDay;
		}
Exemplo n.º 2
0
        void SetupAxes()
        {
            int oneDay = 24 * 60 * 60;

            var plotspace = graph.DefaultPlotSpace;

            plotspace.AllowsUserInteraction = true;

            // Setup scatter plot space
            var     plotSpace = (CPTXYPlotSpace)graph.DefaultPlotSpace;
            decimal xLow      = oneDay * 0.5m;

            var plotRangeX = new CPTPlotRange((NSDecimal)xLow, (NSDecimal)(oneDay * 5m));

            plotSpace.XRange = plotRangeX;

            var plotRangeY = new CPTPlotRange((NSDecimal)1, (NSDecimal)3);


            plotSpace.YRange = plotRangeY;
            // Axes
            var       axisSet = (CPTXYAxisSet)graph.AxisSet;
            CPTXYAxis x       = axisSet.XAxis;

            x.MajorIntervalLength         = oneDay;
            x.OrthogonalCoordinateDecimal = 2;
            x.MinorTicksPerInterval       = 0;

            CPTXYAxis y = axisSet.YAxis;

            y.MajorIntervalLength         = (NSDecimal)0.5;
            y.MinorTicksPerInterval       = 5;
            y.OrthogonalCoordinateDecimal = oneDay;
        }
Exemplo n.º 3
0
        void SetupAxes()
        {
            DateTime refDate = new DateTime(2009, 10, 29);
            int      oneDay  = 24 * 60 * 60;

            var plotspace = graph.DefaultPlotSpace;

            plotspace.AllowsUserInteraction = true;

            // Setup scatter plot space
            CPTXYPlotSpace plotSpace = (CPTXYPlotSpace)graph.DefaultPlotSpace;
            decimal        xLow      = oneDay * 0.5m;

            CPTPlotRange plotRangeX = new CPTPlotRange()
            {
                Location = (NSDecimal)xLow,
                Length   = (NSDecimal)(oneDay * 5m)
            };

            plotSpace.XRange = plotRangeX;             //new CPTPlotRange(); plotRangeWithLocation:CPTDecimalFromFloat(xLow) length:CPTDecimalFromFloat(oneDay*5.0f)];

            CPTPlotRange plotRangeY = new CPTPlotRange()
            {
                Location = (NSDecimal)1,
                Length   = (NSDecimal)3,
            };


            plotSpace.YRange = plotRangeY;            // [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(1.0) length:CPTDecimalFromFloat(3.0)];
//
            // Axes
            CPTXYAxisSet axisSet = (CPTXYAxisSet)graph.AxisSet;
            CPTXYAxis    x       = axisSet.XAxis;

            x.MajorIntervalLength         = oneDay;
            x.OrthogonalCoordinateDecimal = 2;
            x.MinorTicksPerInterval       = 0;
            //NSDateFormatter dateFormatter = new NSDateFormatter ();
            //dateFormatter.DateStyle = NSDateFormatterStyle.Short;

            //TODO:Missing class
            //CPTTimeFormatter timeFormatter = new CPTTimeFormatter(dateFormatter);
            //timeFormatter.referenceDate = refDate;

            //x.LabelFormatter = timeFormatter;

            CPTXYAxis y = axisSet.YAxis;

            y.MajorIntervalLength         = (NSDecimal)0.5;
            y.MinorTicksPerInterval       = 5;
            y.OrthogonalCoordinateDecimal = oneDay;
        }
Exemplo n.º 4
0
        void SetupAxes()
        {
            DateTime refDate = new DateTime (2009, 10, 29);
            int oneDay = 24 * 60 * 60;

            var plotspace = graph.DefaultPlotSpace;
            plotspace.AllowsUserInteraction = true;

            // Setup scatter plot space
            CPTXYPlotSpace plotSpace = (CPTXYPlotSpace)graph.DefaultPlotSpace;
            decimal xLow = oneDay * 0.5m;

            CPTPlotRange plotRangeX = new CPTPlotRange () {
                Location = (NSDecimal)xLow,
                Length = (NSDecimal)(oneDay * 5m)
            };

            plotSpace.XRange = plotRangeX; //new CPTPlotRange(); plotRangeWithLocation:CPTDecimalFromFloat(xLow) length:CPTDecimalFromFloat(oneDay*5.0f)];

            CPTPlotRange plotRangeY = new CPTPlotRange () {
                Location = (NSDecimal)1,
                Length = (NSDecimal)3,
            };

            plotSpace.YRange = plotRangeY;// [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(1.0) length:CPTDecimalFromFloat(3.0)];
            //
            // Axes
            CPTXYAxisSet axisSet = (CPTXYAxisSet)graph.AxisSet;
            CPTXYAxis x = axisSet.XAxis;
            x.MajorIntervalLength = oneDay;
            x.OrthogonalCoordinateDecimal = 2;
            x.MinorTicksPerInterval = 0;
            //NSDateFormatter dateFormatter = new NSDateFormatter ();
            //dateFormatter.DateStyle = NSDateFormatterStyle.Short;

            //TODO:Missing class
            //CPTTimeFormatter timeFormatter = new CPTTimeFormatter(dateFormatter);
            //timeFormatter.referenceDate = refDate;

            //x.LabelFormatter = timeFormatter;

            CPTXYAxis y = axisSet.YAxis;
            y.MajorIntervalLength = (NSDecimal)0.5;
            y.MinorTicksPerInterval = 5;
            y.OrthogonalCoordinateDecimal = oneDay;
        }