def buildjschart(self): NVD3Chart.buildjschart(self) scatter_jschart = '\n' + stab(3) + '.showDistX(true)\n' + \ stab(3) + '.showDistY(true)\n' + \ stab(3) + '.color(d3.scale.category10().range())' start_index = self.jschart.find('.scatterChart()') string_len = len('.scatterChart()') replace_index = start_index + string_len if start_index > 0: self.jschart = self.jschart[:replace_index] + scatter_jschart + self.jschart[replace_index:]
def buildjschart(self): NVD3Chart.buildjschart(self) scatter_jschart = '\n' + stab(3) + '.showDistX(true)\n' + \ stab(3) + '.showDistY(true)\n' + \ stab(3) + '.color(d3.scale.category10().range())' start_index = self.jschart.find('.scatterChart()') string_len = len('.scatterChart()') replace_index = start_index + string_len if start_index > 0: self.jschart = self.jschart[: replace_index] + scatter_jschart + self.jschart[ replace_index:]
def buildjschart(self): NVD3Chart.buildjschart(self) pie_jschart = '\n' + stab(2) + 'chart.x(function(d) { return d.x })\n' + \ stab(3) + '.y(function(d) { return d.y })\n' + \ stab(3) + '.values(function(d) { return d });\n' if self.width: pie_jschart += stab(2) + 'chart.width(%s);\n' % self.width if self.height: pie_jschart += stab(2) + 'chart.height(%s);\n' % self.height start_index = self.jschart.find('.pieChart();') string_len = len('.pieChart();') replace_index = start_index + string_len if start_index > 0: self.jschart = self.jschart[:replace_index] + pie_jschart + self.jschart[replace_index:]
def buildjschart(self): NVD3Chart.buildjschart(self) pie_jschart = '\n' + stab(2) + 'chart.x(function(d) { return d.x })\n' + \ stab(3) + '.y(function(d) { return d.y })\n' + \ stab(3) + '.values(function(d) { return d })\n' + \ stab(3) + '.color(d3.scale.category10().range());\n' if self.width: pie_jschart += stab(2) + 'chart.width(%s);\n' % self.width if self.height: pie_jschart += stab(2) + 'chart.height(%s);\n' % self.height start_index = self.jschart.find('.pieChart();') string_len = len('.pieChart();') replace_index = start_index + string_len if start_index > 0: self.jschart = self.jschart[:replace_index] + pie_jschart + self.jschart[replace_index:]