asp.net mvc 4 - Conversion of decimal[ ] to double [ ] in c# -


I am creating a plot in the asp.net-mvc4 application using the following code

  SYSTEM. Web. UI. Datvisijation Charting Chart chart = new system Web. UI. Datvisijation Charting. Chart (); Chart.BackColor = Color.Transparent; Chart.Width = Unit Pixel (700); Chart.Height = Unit Pixel (420); Chart.BackColor = Color.FromArgb (211, 223, 240); Chart.BorderlineDashStyle = ChartDesstyle. Solid; Chart.BackSecondaryColor = Color. White; Chart.BackGradientStyle = GradientStyle.TopBottom; Chart.BorderlineWidth = 1; Chart.Palette = Chart Colorellet. Bytepastell; Chart. Borderline collar = color. From ARGB (26, 59, 105); Chart. Type Reader = RenderType Binary streaming; Chart.BorderSkin.SkinStyle = BorderSkinStyle.Emboss; Chart.AntiAliasing = AntiAliasingStyles.All; Chart.TextAntiAliasingQuality = TextInstalling Properties Normal; Series series 1 = new series ("Series 1"); Series 1 Chart array = "ca 1"; Series 1 ChartType = SerguitType Line; Series 1 Font = new font ("vardana", 8.25f, fontstelle. Regular); Series 1 Point Add (new datapoint {axlabil = "value1", y value = new double [] {100}}); Series 1 Point Add (new datapoint {axislabil = "value 2", YValues ​​= new double [] {500}}); Chart.Series.Add (SERIES1); Chartar ca1 = new chartaray ("ca 1"); Ca1.BackColor = Color.Transparent; Chart.ChartAreas.Add (CA1); (Var ms = new memorystream ()) using {chart.SaveImage (ms, ChartImageFormat.Png); Ms.Seek (0, SeekOrigin.Begin); Return file (MS ToArray (), "image / png", "mychart.png"); }  

Now my data point is in the form of an array from the database saved in returnValue . I've added the edit data point below

  chain 1. Point Add (New Datapoint {AxisLabel = "Value1", YValues ​​= new double [] {returnValue.yData}});  

error

  doubling of decimal [] is not possible to convert  

< Div class = "post-text" itemprop = "text">

Use Convert. Repeat:

  chain 1. Point Add (New Datapoint {AxisLabel = "Value1", YValues ​​= returnValue .ydata.Select (convert toDouble) .ToArray ()});  

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -