<commit_before>class Dashing.AgentDonut extends Dashing.Widget

    @accessor 'data'

    constructor: ->
        super
        @instanceDataId = ''
        @oldPieData = {}
        
    ready: ->
        @instanceDataId = $(@node).attr('data-id')
        window.oldPieData = window.oldPieData or {}
        window.oldPieData[@instanceDataId] = window.oldPieData[@instanceDataId] or []

    onData: (data) ->
        #$(@node).fadeOut().fadeIn()

        # Define the container
        @container = $(@node).parent()
        #console.log 'node',$(@node)
        #console.log 'container',@container

        #
        # CONFIG ZONE
        #

        # Width of the SVG area
        @width = (Dashing.widget_base_dimensions[0] * @container.data('sizex')) - Dashing.widget_margins[0] * 4 * (@container.data('sizex') - 1) 

        # Height of the SVG area allowing for header and footer text
        @height = (Dashing.widget_base_dimensions[1] * @container.data('sizey')) - 120 

        # Calculated min dimension of the SVG area<commit_msg>AgentDonut: code cleanup<commit_after>class Dashing.AgentDonut extends Dashing.Widget

    @accessor 'data'

    constructor: ->
        super
        @instanceDataId = ''
        @oldPieData = {}
        
    ready: ->
        @instanceDataId = $(@node).attr('data-id')
        window.oldPieData = window.oldPieData or {}
        window.oldPieData[@instanceDataId] = window.oldPieData[@instanceDataId] or []

    onData: (data) ->
        #$(@node).fadeOut().fadeIn()

        # Define the container
        @container = $(@node).parent()

        #
        # CONFIG ZONE
        #

        # Width of the SVG area
        @width = (Dashing.widget_base_dimensions[0] * @container.data('sizex')) - Dashing.widget_margins[0] * 4 * (@container.data('sizex') - 1) 

        # Height of the SVG area allowing for header and footer text
        @height = (Dashing.widget_base_dimensions[1] * @container.data('sizey')) - 120 

        # Calculated min dimension of the SVG area
{'fraction_non_alphanumeric': 0.13320079522862824, 'fraction_numerical': 0.007952286282306162, 'mean_word_length': 2.3831932773109243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4611773', 'n_tokens_mistral': 652, 'n_tokens_neox': 609, 'n_words': 131}