예제 #1
0
        /**
         * Retrieves the JSON data for the cols
         */
        private static string GetJSONCols(string[] titles, GoogleChartRow googleChartRow)
        {
            // Gets the types, converts them to DataTable type strings, joins them with titles (using the counter) and formats them into a single JSON string
            int i = 0;

            return(string.Format(COL_TEMPLATE, string.Join(",", googleChartRow.Types.Select(r => string.Format(COL_LINE_TEMPLATE, new object[] { i, titles[i++], GetStringType(r) })))));
        }
 /**
  * Retrieves the JSON data for the cols
  */
 private static string GetJSONCols(string[] titles, GoogleChartRow googleChartRow)
 {
     // Gets the types, converts them to DataTable type strings, joins them with titles (using the counter) and formats them into a single JSON string
     int i = 0;
     return string.Format(COL_TEMPLATE, string.Join(",", googleChartRow.Types.Select(r => string.Format(COL_LINE_TEMPLATE, new object[] { i, titles[i++], GetStringType(r) }))));
 }