#NEWLINE# @ classmethod #NEWLINE# def convert_standard_chartdata_to_datatable_json( cls , data ) : #NEWLINE# #INDENT# '\n        Converts a ChartData object to a datatable json blob assuming\n        that the first column is a label and all subsequent columns are numbers\n        ' #NEWLINE# cols = data . get_columns ( ) #NEWLINE# label_col = cols [ 0 ] #NEWLINE# data_cols = cols [ 1 : ] #NEWLINE# if ( 'datatype' not in label_col . metadata ) : #NEWLINE# #INDENT# label_col . metadata [ 'datatype' ] = 'string' #NEWLINE# #UNINDENT# for col in data_cols : #NEWLINE# #INDENT# if ( 'datatype' not in col . metadata ) : #NEWLINE# #INDENT# col . metadata [ 'datatype' ] = 'number' #NEWLINE# #UNINDENT# #UNINDENT# return cls . convert_generic_to_datatable_json ( data )