def __str__(self): """ Return the svg container """ self.processData() categories = AresHtmlRadio.Radio( self.aresObj, [key for key, _, _ in self.chartKeys], cssAttr={'display': 'None'} if len(self.chartKeys) == 2 else {}, internalRef='key_%s' % self.htmlId) categories.select(self.selectedChartKey) self.dynKeySelection = categories.val # The javascript representation of the radio values = AresHtmlRadio.Radio( self.aresObj, [val for val, _, _ in self.chartVals], cssAttr={'display': 'None'} if len(self.chartVals) == 1 else {}, internalRef='val_%s' % self.htmlId) values.select(self.selectedChartVal) self.dynValSelection = values.val # The javascript representation of the radio categories.click([self]) values.click([self]) self.htmlContent.append(str(categories)) self.htmlContent.append(str(values)) self.htmlContent.append('<div %s></div>' % self.strAttr()) return str( AresHtmlContainer.AresBox(self.htmlId, "\n".join(self.htmlContent), self.headerBox, properties=self.references))
def __str__(self): """ Return the svg container """ self.processData() self.categories = AresHtmlRadio.Radio( self.aresObj, [key for key, _, _ in self.chartKeys], cssAttr={'display': 'None'} if len(self.chartKeys) == 1 else {}, checked=self.selectedChartKey) self.values = AresHtmlRadio.Radio( self.aresObj, [val for val, _, _ in self.chartVals], cssAttr={'display': 'None'} if len(self.chartVals) == 1 else {}, checked=self.selectedChartVal) self.categories.click([self]) self.values.click([self]) self.htmlContent.append(str(self.categories)) self.htmlContent.append(str(self.values)) self.htmlContent.append( '<div %s style="height:%spx;"><svg style="width:100%%;height:%spx;"></svg></div>' % (self.strAttr(), self.height, self.height)) if self.headerBox: return str( AresHtmlContainer.AresBox(self.htmlId, "\n".join(self.htmlContent), self.headerBox, properties=self.references)) return "\n".join(self.htmlContent)
def __str__(self): """ Return the svg container """ self.processData() self.categories = AresHtmlRadio.Radio(self.aresObj, [key for key, _, _ in self.chartKeys], cssAttr={'display': 'None'}, internalRef='key_%s' % self.htmlId, checked=self.selectedChartKey) self.values = AresHtmlRadio.Radio(self.aresObj, [val for val, _, _ in self.chartVals], cssAttr={'display': 'None'}, internalRef='val_%s' % self.htmlId, checked=self.selectedChartVal) self.categories.click([self]) self.values.click([self]) self.htmlContent.append(str(self.categories)) self.htmlContent.append(str(self.values)) self.htmlContent.append('<div %s></div>' % self.strAttr()) if self.headerBox: return str(AresHtmlContainer.AresBox(self.htmlId, "\n".join(self.htmlContent), self.headerBox, properties=self.references)) return "\n".join(self.htmlContent)