'This will display a button which when pressed will display a chart
When a chart is not appropriate then the subclass will override this
function with a null function.
@todo: parameter description
@todo: make a class property rather than overriding in subclasses'

def chartButton(self, series_id):

    if (len(self.valueList) == 0):
        return None
    if (series_id is None):
        return None
    src = URL(f='completed_chart', vars={'question_id': self.question_id, 'series_id': series_id, 'type': self.type})
    link = A(current.T('Chart'), _href=src, _target='blank', _class='action-btn')
    return DIV(link, _class=('surveyChart%sWidget' % self.type))
