Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
738 Points
452 Posts
Feb 10, 2012 02:19 PM|LINK
When displaying a chart is it possible to let users select a custom period for the data?
@{ var db = Database.Open("datab"); var data = db.Query("SELECT Date, XAG FROM metals WHERE ID > '4000'"); var myTheme = @"<Chart BorderlineDashStyle=""Solid"" BorderlineWidth=""1"" BorderlineColor=""#eeeeee"" BackSecondaryColor=""#ffffff"" BackColor=""#fbfbfb"" BackGradientStyle=""TopBottom"" Palette=""BrightPastel"" AntiAliasing=""All""> <ChartAreas> <ChartArea Name=""Default"" _Template_=""All"" BackColor=""Transparent""> <AxisY LineColor=""64, 64, 64, 64""> <MajorGrid Interval=""Auto"" LineColor=""#dddddd"" /> <LabelStyle Font=""Trebuchet MS, 8.25pt"" /> </AxisY> <AxisX LineColor=""64, 64, 64, 64""> <MajorGrid LineColor=""#dddddd"" /> <LabelStyle Font=""Trebuchet MS, 8.25pt"" /> </AxisX> </ChartArea> </ChartAreas> <Legends> <Legend _Template_=""All"" Alignment=""Center"" BackColor=""Transparent"" Docking=""Bottom"" Font=""Trebuchet MS, 8.25pt"" IsTextAutoFit =""False"" LegendStyle=""Row""></Legend> </Legends> </Chart>"; var myChart = new Chart(width:610, height:498, theme: myTheme) .AddTitle("XAG") .AddLegend() .AddSeries("XAG", chartType: "Line", xValue: data, xField: "Data", yValues: data, yFields: "XAG") .Write("png"); }
dow7
Member
738 Points
452 Posts
When displaying a chart is it possible to let users select a custom period for the data?
Feb 10, 2012 02:19 PM|LINK
When displaying a chart is it possible to let users select a custom period for the data?
@{ var db = Database.Open("datab"); var data = db.Query("SELECT Date, XAG FROM metals WHERE ID > '4000'"); var myTheme = @"<Chart BorderlineDashStyle=""Solid"" BorderlineWidth=""1"" BorderlineColor=""#eeeeee"" BackSecondaryColor=""#ffffff"" BackColor=""#fbfbfb"" BackGradientStyle=""TopBottom"" Palette=""BrightPastel"" AntiAliasing=""All""> <ChartAreas> <ChartArea Name=""Default"" _Template_=""All"" BackColor=""Transparent""> <AxisY LineColor=""64, 64, 64, 64""> <MajorGrid Interval=""Auto"" LineColor=""#dddddd"" /> <LabelStyle Font=""Trebuchet MS, 8.25pt"" /> </AxisY> <AxisX LineColor=""64, 64, 64, 64""> <MajorGrid LineColor=""#dddddd"" /> <LabelStyle Font=""Trebuchet MS, 8.25pt"" /> </AxisX> </ChartArea> </ChartAreas> <Legends> <Legend _Template_=""All"" Alignment=""Center"" BackColor=""Transparent"" Docking=""Bottom"" Font=""Trebuchet MS, 8.25pt"" IsTextAutoFit =""False"" LegendStyle=""Row""></Legend> </Legends> </Chart>"; var myChart = new Chart(width:610, height:498, theme: myTheme) .AddTitle("XAG") .AddLegend() .AddSeries("XAG", chartType: "Line", xValue: data, xField: "Data", yValues: data, yFields: "XAG") .Write("png"); }