Click here to Skip to main content
15,923,051 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
am create a new chart code for

XML
string greenTheme = @"<Chart BackColor=""#C9DC87"" BackGradientStyle=""TopBottom"" BorderColor=""181, 64, 1"" BorderWidth=""1"" BorderlineDashStyle=""Solid"" Palette=""BrightPastel"" PaletteCustomColors='0,0,255; 0,255,0; 255,0,0; 0,255,255; 255,0,255; 255,255,0' >
                   <ChartAreas>
                   <ChartArea Name=""Default"" _Template_=""All"" BackColor=""Transparent"" BackSecondaryColor=""White"" BorderColor=""64, 64, 64, 64"" BorderDashStyle=""Solid"" ShadowColor=""Transparent"">
                     <AxisY LineColor=""64, 64, 64, 64"">
                       <MajorGrid Interval=""Auto"" LineColor=""64, 64, 64, 64"" />
                       <LabelStyle Font=""Trebuchet MS, 8.25pt, style=Bold"" />
                     </AxisY>
                     <AxisX LineColor=""64, 64, 64, 64"" Interval=""1"">
                       <MajorGrid LineColor=""64, 64, 64, 64"" />
                       <LabelStyle Font=""Trebuchet MS, 8.25pt, style=Bold"" />
                     </AxisX>
                     <Area3DStyle Inclination=""15"" IsClustered=""False"" IsRightAngleAxes=""False"" Perspective=""10"" Rotation=""10"" WallWidth=""0"" />

                   </ChartArea>
                 </ChartAreas>
                 <Legends>
                   <Legend _Template_=""All"" Alignment=""Center""  BackColor=""Transparent""  Docking=""Bottom"" Font=""Trebuchet MS, 10pt, style=Bold"" IsTextAutoFit =""False"" LegendStyle=""Row"">

                   </Legend>
                 </Legends>
                 <BorderSkin SkinStyle=""Emboss"" />
               </Chart>";


C#
var myChart = new Chart(width: 900, height: 400, theme: greenTheme)
                   .AddSeries(Class,
                     xValue: xFieldRange,
                     yValues: 90,80,null,56
                   chartType: type, markerStep: 500)

                   .AddSeries(AVG,
                       xValue: xFieldRange,
                       yValues: null,0,null,23,
                       chartType: type, markerStep: 500)

                   .AddSeries(MARK,
                         xValue: xFieldRange,
                       yValues: null,100,null,23,
                       chartType: type, markerStep: 500)

                     .AddSeries(GOAL,
                         xValue: xFieldRange,
                       yValues: null,10,null,29,
                       chartType: type, markerStep: 500,chartArea :null).AddLegend()
                   .Save(fileName,FILE_FORMAT);



this code use but not show point line and labels
please help me
chart line width increase and point value near label show and null value point color change
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900