예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Chart{T}" /> class.
        /// </summary>
        /// <param name="viewContext">The view context.</param>
        /// <param name="clientSideObjectWriterFactory">The client side object writer factory.</param>
        /// <param name="urlGenerator">The URL Generator.</param>
        public Chart(ViewContext viewContext, IClientSideObjectWriterFactory clientSideObjectWriterFactory, IUrlGenerator urlGenerator)
            : base(viewContext, clientSideObjectWriterFactory)
        {
            ScriptFileNames.AddRange(new[] { "telerik.common.js", "telerik.chart.js" });

            ClientEvents   = new ChartClientEvents();
            UrlGenerator   = urlGenerator;
            Title          = new ChartTitle();
            ChartArea      = new ChartArea();
            PlotArea       = new PlotArea();
            Legend         = new ChartLegend();
            Series         = new List <ChartSeriesBase <T> >();
            CategoryAxis   = new ChartCategoryAxis <T>(this);
            ValueAxis      = new ChartNumericAxis <T>(this);
            XAxis          = new ChartNumericAxis <T>(this);
            YAxis          = new ChartNumericAxis <T>(this);
            DataBinding    = new ChartDataBindingSettings(this);
            SeriesDefaults = new ChartSeriesDefaults <T>(this);
            AxisDefaults   = new ChartAxisDefaults <T>(this);
            Tooltip        = new ChartTooltip();
            Transitions    = true;
        }
예제 #2
0
 public ChartLegendSerializer(ChartLegend legend)
 {
     this.legend = legend;
 }
 public ChartLegendBuilderTests()
 {
     legend = new ChartLegend();
     builder = new ChartLegendBuilder(legend);
 }
 public ChartLegendSerializer(ChartLegend legend)
 {
     this.legend = legend;
 }