(self, **kwargs)
This is the base class for all the charts. The following keywords are
        accepted:

        :keyword: **display_container** - default: ``True``
        :keyword: **jquery_on_ready** - default: ``False``
        :keyword: **charttooltip_dateformat** - default: ``'%d %b %Y'``
        :keyword: **name** - default: the class name
                    ``model`` - set the model (e.g. ``pieChart``, `
                    ``LineWithFocusChart``, ``MultiBarChart``).
        :keyword: **color_category** - default - ``None``
        :keyword: **color_list** - default - ``None``
                  used by pieChart (e.g. ``['red', 'blue', 'orange']``)
        :keyword: **margin_bottom** - default - ``20``
        :keyword: **margin_left** - default - ``60``
        :keyword: **margin_right** - default - ``60``
        :keyword: **margin_top** - default - ``30``
        :keyword: **height** - default - ``''``
        :keyword: **width** - default - ``''``
        :keyword: **show_values** - default - ``False``
        :keyword: **stacked** - default - ``False``
        :keyword: **focus_enable** - default - ``False``
        :keyword: **resize** - define - ``False``
        :keyword: **no_data_message** - default - ``None`` or nvd3 default
        :keyword: **xAxis_rotateLabel** - default - ``0``
        :keyword: **xAxis_staggerLabel** - default - ``False``
        :keyword: **xAxis_showMaxMin** - default - ``True``
        :keyword: **right_align_y_axis** - default - ``False``
        :keyword: **show_controls** - default - ``True``
        :keyword: **show_legend** - default - ``True``
        :keyword: **show_labels** - default - ``True``
        :keyword: **tag_script_js** - default - ``True``
        :keyword: **use_interactive_guideline** - default - ``False``
        :keyword: **chart_attr** - default - ``None``
        :keyword: **extras** - default - ``None``

            Extra chart modifiers. Use this to modify different attributes of
            the chart.
        :keyword: **x_axis_date** - default - False
            Signal that x axis is a date axis
        :keyword: **date_format** - default - ``%x``
                  see https://github.com/mbostock/d3/wiki/Time-Formatting
        :keyword: **y_axis_scale_min** - default - ``''``.
        :keyword: **y_axis_scale_max** - default - ``''``.
        :keyword: **x_axis_format** - default - ``''``.
        :keyword: **y_axis_format** - default - ``''``.
        :keyword: **style** - default - ``''``
            Style modifiers for the DIV container.
        :keyword: **color_category** - default - ``category10``

            Acceptable values are nvd3 categories such as
            ``category10``, ``category20``, ``category20c``.
This is the base class for all the charts. The following keywords are
        accepted:
This is the base class for all the charts . The following keywords are accepted :
def __init__(self, **kwargs):
        """
        This is the base class for all the charts. The following keywords are
        accepted:

        :keyword: **display_container** - default: ``True``
        :keyword: **jquery_on_ready** - default: ``False``
        :keyword: **charttooltip_dateformat** - default: ``'%d %b %Y'``
        :keyword: **name** - default: the class name
                    ``model`` - set the model (e.g. ``pieChart``, `
                    ``LineWithFocusChart``, ``MultiBarChart``).
        :keyword: **color_category** - default - ``None``
        :keyword: **color_list** - default - ``None``
                  used by pieChart (e.g. ``['red', 'blue', 'orange']``)
        :keyword: **margin_bottom** - default - ``20``
        :keyword: **margin_left** - default - ``60``
        :keyword: **margin_right** - default - ``60``
        :keyword: **margin_top** - default - ``30``
        :keyword: **height** - default - ``''``
        :keyword: **width** - default - ``''``
        :keyword: **show_values** - default - ``False``
        :keyword: **stacked** - default - ``False``
        :keyword: **focus_enable** - default - ``False``
        :keyword: **resize** - define - ``False``
        :keyword: **no_data_message** - default - ``None`` or nvd3 default
        :keyword: **xAxis_rotateLabel** - default - ``0``
        :keyword: **xAxis_staggerLabel** - default - ``False``
        :keyword: **xAxis_showMaxMin** - default - ``True``
        :keyword: **right_align_y_axis** - default - ``False``
        :keyword: **show_controls** - default - ``True``
        :keyword: **show_legend** - default - ``True``
        :keyword: **show_labels** - default - ``True``
        :keyword: **tag_script_js** - default - ``True``
        :keyword: **use_interactive_guideline** - default - ``False``
        :keyword: **chart_attr** - default - ``None``
        :keyword: **extras** - default - ``None``

            Extra chart modifiers. Use this to modify different attributes of
            the chart.
        :keyword: **x_axis_date** - default - False
            Signal that x axis is a date axis
        :keyword: **date_format** - default - ``%x``
                  see https://github.com/mbostock/d3/wiki/Time-Formatting
        :keyword: **y_axis_scale_min** - default - ``''``.
        :keyword: **y_axis_scale_max** - default - ``''``.
        :keyword: **x_axis_format** - default - ``''``.
        :keyword: **y_axis_format** - default - ``''``.
        :keyword: **style** - default - ``''``
            Style modifiers for the DIV container.
        :keyword: **color_category** - default - ``category10``

            Acceptable values are nvd3 categories such as
            ``category10``, ``category20``, ``category20c``.
        """
        # set the model
        self.model = self.__class__.__name__  #: The chart model,

        #: an Instance of Jinja2 template
        self.template_page_nvd3 = template_page
        self.template_content_nvd3 = template_content
        self.series = []
        self.axislist = {}
        # accepted keywords
        self.display_container = kwargs.get('display_container', True)
        self.charttooltip_dateformat = kwargs.get('charttooltip_dateformat',
                                                  '%d %b %Y')
        self._slugify_name(kwargs.get('name', self.model))
        self.jquery_on_ready = kwargs.get('jquery_on_ready', False)
        self.color_category = kwargs.get('color_category', None)
        self.color_list = kwargs.get('color_list', None)
        self.margin_bottom = kwargs.get('margin_bottom', 20)
        self.margin_left = kwargs.get('margin_left', 60)
        self.margin_right = kwargs.get('margin_right', 60)
        self.margin_top = kwargs.get('margin_top', 30)
        self.height = kwargs.get('height', '')
        self.width = kwargs.get('width', '')
        self.show_values = kwargs.get('show_values', False)
        self.stacked = kwargs.get('stacked', False)
        self.focus_enable = kwargs.get('focus_enable', False)
        self.resize = kwargs.get('resize', False)
        self.no_data_message = kwargs.get('no_data_message', None)
        self.xAxis_rotateLabel = kwargs.get('xAxis_rotateLabel', 0)
        self.xAxis_staggerLabel = kwargs.get('xAxis_staggerLabel', False)
        self.xAxis_showMaxMin = kwargs.get('xAxis_showMaxMin', True)
        self.right_align_y_axis = kwargs.get('right_align_y_axis', False)
        self.show_controls = kwargs.get('show_controls', True)
        self.show_legend = kwargs.get('show_legend', True)
        self.show_labels = kwargs.get('show_labels', True)
        self.tooltip_separator = kwargs.get('tooltip_separator')
        self.tag_script_js = kwargs.get('tag_script_js', True)
        self.use_interactive_guideline = kwargs.get("use_interactive_guideline",
                                                    False)
        self.chart_attr = kwargs.get("chart_attr", {})
        self.extras = kwargs.get('extras', None)
        self.style = kwargs.get('style', '')
        self.date_format = kwargs.get('date_format', '%x')
        self.x_axis_date = kwargs.get('x_axis_date', False)
        self.y_axis_scale_min = kwargs.get('y_axis_scale_min', '')
        self.y_axis_scale_max = kwargs.get('y_axis_scale_max', '')
        #: x-axis contain date format or not
        # possible duplicate of x_axis_date
        self.date_flag = kwargs.get('date_flag', False)
        self.x_axis_format = kwargs.get('x_axis_format', '')
        # Load remote JS assets or use the local bower assets?
        self.remote_js_assets = kwargs.get('remote_js_assets', True)
        self.callback = kwargs.get('callback', None)

        # None keywords attribute that should be modified by methods
        # We should change all these to _attr

        self.htmlcontent = ''  #: written by buildhtml
        self.htmlheader = ''
        #: Place holder for the graph (the HTML div)
        #: Written by ``buildcontainer``
        self.container = u''
        #: Header for javascript code
        self.containerheader = u''
        # CDN http://cdnjs.com/libraries/nvd3/ needs to make sure it's up to
        # date
        self.header_css = [
            '<link href="%s" rel="stylesheet" />' % h for h in
            (
                'https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.8.6/nv.d3.min.css' if self.remote_js_assets else self.assets_directory + 'nvd3/src/nv.d3.css',
            )
        ]

        self.header_js = [
            '<script src="%s"></script>' % h for h in
            (
                'https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js' if self.remote_js_assets else self.assets_directory + 'd3/d3.min.js',
                'https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.8.6/nv.d3.min.js' if self.remote_js_assets else self.assets_directory + 'nvd3/nv.d3.min.js'
            )
        ]

        #: Javascript code as string
        self.jschart = None
        self.custom_tooltip_flag = False
        self.charttooltip = ''
        self.serie_no = 1
def __init__ ( self , * * kwargs ) : # set the model self . model = self . __class__ . __name__ #: The chart model, #: an Instance of Jinja2 template self . template_page_nvd3 = template_page self . template_content_nvd3 = template_content self . series = [ ] self . axislist = { } # accepted keywords self . display_container = kwargs . get ( 'display_container' , True ) self . charttooltip_dateformat = kwargs . get ( 'charttooltip_dateformat' , '%d %b %Y' ) self . _slugify_name ( kwargs . get ( 'name' , self . model ) ) self . jquery_on_ready = kwargs . get ( 'jquery_on_ready' , False ) self . color_category = kwargs . get ( 'color_category' , None ) self . color_list = kwargs . get ( 'color_list' , None ) self . margin_bottom = kwargs . get ( 'margin_bottom' , 20 ) self . margin_left = kwargs . get ( 'margin_left' , 60 ) self . margin_right = kwargs . get ( 'margin_right' , 60 ) self . margin_top = kwargs . get ( 'margin_top' , 30 ) self . height = kwargs . get ( 'height' , '' ) self . width = kwargs . get ( 'width' , '' ) self . show_values = kwargs . get ( 'show_values' , False ) self . stacked = kwargs . get ( 'stacked' , False ) self . focus_enable = kwargs . get ( 'focus_enable' , False ) self . resize = kwargs . get ( 'resize' , False ) self . no_data_message = kwargs . get ( 'no_data_message' , None ) self . xAxis_rotateLabel = kwargs . get ( 'xAxis_rotateLabel' , 0 ) self . xAxis_staggerLabel = kwargs . get ( 'xAxis_staggerLabel' , False ) self . xAxis_showMaxMin = kwargs . get ( 'xAxis_showMaxMin' , True ) self . right_align_y_axis = kwargs . get ( 'right_align_y_axis' , False ) self . show_controls = kwargs . get ( 'show_controls' , True ) self . show_legend = kwargs . get ( 'show_legend' , True ) self . show_labels = kwargs . get ( 'show_labels' , True ) self . tooltip_separator = kwargs . get ( 'tooltip_separator' ) self . tag_script_js = kwargs . get ( 'tag_script_js' , True ) self . use_interactive_guideline = kwargs . get ( "use_interactive_guideline" , False ) self . chart_attr = kwargs . get ( "chart_attr" , { } ) self . extras = kwargs . get ( 'extras' , None ) self . style = kwargs . get ( 'style' , '' ) self . date_format = kwargs . get ( 'date_format' , '%x' ) self . x_axis_date = kwargs . get ( 'x_axis_date' , False ) self . y_axis_scale_min = kwargs . get ( 'y_axis_scale_min' , '' ) self . y_axis_scale_max = kwargs . get ( 'y_axis_scale_max' , '' ) #: x-axis contain date format or not # possible duplicate of x_axis_date self . date_flag = kwargs . get ( 'date_flag' , False ) self . x_axis_format = kwargs . get ( 'x_axis_format' , '' ) # Load remote JS assets or use the local bower assets? self . remote_js_assets = kwargs . get ( 'remote_js_assets' , True ) self . callback = kwargs . get ( 'callback' , None ) # None keywords attribute that should be modified by methods # We should change all these to _attr self . htmlcontent = '' #: written by buildhtml self . htmlheader = '' #: Place holder for the graph (the HTML div) #: Written by ``buildcontainer`` self . container = u'' #: Header for javascript code self . containerheader = u'' # CDN http://cdnjs.com/libraries/nvd3/ needs to make sure it's up to # date self . header_css = [ '<link href="%s" rel="stylesheet" />' % h for h in ( 'https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.8.6/nv.d3.min.css' if self . remote_js_assets else self . assets_directory + 'nvd3/src/nv.d3.css' , ) ] self . header_js = [ '<script src="%s"></script>' % h for h in ( 'https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js' if self . remote_js_assets else self . assets_directory + 'd3/d3.min.js' , 'https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.8.6/nv.d3.min.js' if self . remote_js_assets else self . assets_directory + 'nvd3/nv.d3.min.js' ) ] #: Javascript code as string self . jschart = None self . custom_tooltip_flag = False self . charttooltip = '' self . serie_no = 1