def drawChart(self,
                  series_id,
                  output="xml",
                  data=None,
                  label=None,
                  xLabel=None,
                  yLabel=None):

        chartFile = self.getChartName(series_id)
        cached = S3Chart.getCachedFile(chartFile)
        if cached:
            return cached

        chart = S3Chart(path=chartFile)
        chart.asInt = True
        if data == None:
            chart.survey_hist(self.qstnWidget.question.name,
                              self.valueList,
                              10,
                              0,
                              self.max,
                              xlabel = self.qstnWidget.question.name,
                              ylabel = current.T("Count")
                             )
        else:
            chart.survey_bar(self.qstnWidget.question.name,
                             data,
                             label,
                             []
                            )
        image = chart.draw(output=output)
        return image

    # -------------------------------------------------------------------------
@todo: docstring
dataset/ETHPy150Open sahana/eden/modules/s3db/survey.py/S3NumericAnalysis.drawChart