Ejemplo n.º 1
0
        public ChartNumericAxisBuilderTests()
        {
            var chart = ChartTestHelper.CreateChart <SalesData>();

            axis    = new ChartNumericAxis <SalesData>(chart);
            builder = new ChartNumericAxisBuilder(axis);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Defines a numeric value axis.
        /// </summary>
        public virtual ChartNumericAxisBuilder Numeric()
        {
            var numericAxis = new ChartNumericAxis <TModel>(Container);

            Container.ValueAxis = numericAxis;

            return(new ChartNumericAxisBuilder(numericAxis));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Defines a numeric value axis.
        /// </summary>
        public virtual ChartNumericAxisBuilder Numeric(string name)
        {
            var numericAxis = new ChartNumericAxis <TModel>(Container);

            numericAxis.Name = name;

            Axes.Add(numericAxis);

            return(new ChartNumericAxisBuilder(numericAxis));
        }
Ejemplo n.º 4
0
        public void YAxis_should_be_serialized()
        {
            var numericAxis = new ChartNumericAxis <SalesData>(chart);

            numericAxis.Name = "Y Axis";
            chart.YAxes.Add(numericAxis);
            chart.WriteInitializationScript(textWriter.Object);

            output.ShouldEqual("jQuery('#Chart').tChart({yAxis:[{\"name\":\"Y Axis\"}]});");
        }
Ejemplo n.º 5
0
        public void ValueAxis_should_be_serialized()
        {
            var numericAxis = new ChartNumericAxis <SalesData>(chart);

            numericAxis.Min = 1;
            chart.ValueAxes.Add(numericAxis);
            chart.WriteInitializationScript(textWriter.Object);

            output.ShouldEqual("jQuery('#Chart').tChart({valueAxis:[{\"min\":1}]});");
        }
        public void YAxis_should_be_serialized()
        {
            var numericAxis = new ChartNumericAxis<SalesData>(chart);
            numericAxis.Name = "Y Axis";
            chart.YAxes.Add(numericAxis);
            chart.WriteInitializationScript(textWriter.Object);

            output.ShouldEqual("jQuery('#Chart').tChart({yAxis:[{\"name\":\"Y Axis\"}]});");
        }
        public void ValueAxis_should_be_serialized()
        {
            var numericAxis = new ChartNumericAxis<SalesData>(chart);
            numericAxis.Min = 1;
            chart.ValueAxes.Add(numericAxis);
            chart.WriteInitializationScript(textWriter.Object);

            output.ShouldEqual("jQuery('#Chart').tChart({valueAxis:[{\"min\":1}]});");
        }
 public ChartNumericAxisBuilderTests()
 {
     var chart = ChartTestHelper.CreateChart<SalesData>();
     axis = new ChartNumericAxis<SalesData>(chart);
     builder = new ChartNumericAxisBuilder(axis);
 }