Пример #1
0
        /// <summary>
        /// Writes the initialization script.
        /// </summary>
        /// <param name="writer">The writer object.</param>
        public override void WriteInitializationScript(TextWriter writer)
        {
            var objectWriter = ClientSideObjectWriterFactory.Create(Id, "tChart", writer);

            objectWriter.Start();

            SerializeData("chartArea", ChartArea.CreateSerializer().Serialize(), objectWriter);
            SerializeData("plotArea", PlotArea.CreateSerializer().Serialize(), objectWriter);

            SerializeTheme(objectWriter);

            SerializeData("title", Title.CreateSerializer().Serialize(), objectWriter);

            SerializeData("legend", Legend.CreateSerializer().Serialize(), objectWriter);

            SerializeSeries(objectWriter);

            SerializeData("seriesDefaults", SeriesDefaults.CreateSerializer().Serialize(), objectWriter);

            SerializeData("axisDefaults", AxisDefaults.CreateSerializer().Serialize(), objectWriter);

            SerializeData("categoryAxis", CategoryAxis.CreateSerializer().Serialize(), objectWriter);

            SerializeData("valueAxis", ValueAxis.CreateSerializer().Serialize(), objectWriter);

            SerializeData("xAxis", XAxis.CreateSerializer().Serialize(), objectWriter);

            SerializeData("yAxis", YAxis.CreateSerializer().Serialize(), objectWriter);

            SerializeTransitions(objectWriter);

            SerializeDataBinding(objectWriter);

            SerializeSeriesColors(objectWriter);

            SerializeData("tooltip", Tooltip.CreateSerializer().Serialize(), objectWriter);

            ClientEvents.SerializeTo(objectWriter);

            objectWriter.Complete();

            base.WriteInitializationScript(writer);
        }