/**
* Copyright 2012-2018, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

'use strict';

var scatterPolarAttrs = require('../scatterpolar/attributes');
var barAttrs = require('../bar/attributes');

module.exports = {
    r: scatterPolarAttrs.r,
    theta: scatterPolarAttrs.theta,
    r0: scatterPolarAttrs.r0,
    dr: scatterPolarAttrs.dr,
    theta0: scatterPolarAttrs.theta0,
    dtheta: scatterPolarAttrs.dtheta,
    thetaunit: scatterPolarAttrs.thetaunit,

    // orientation: {
    //     valType: 'enumerated',
    //     role: 'info',
    //     values: ['radial', 'angular'],
    //     editType: 'calc+clearAxisTypes',
    //     description: 'Sets the orientation of the bars.'
    // },

    base: barAttrs.base,
    offset: barAttrs.offset,
    width: barAttrs.width,

    text: barAttrs.text,
    // hovertext: barAttrs.hovertext,

    // textposition: {},
    // textfont: {},
    // insidetextfont: {},
    // outsidetextfont: {},
    // constraintext: {},
    // cliponaxis: extendFlat({}, barAttrs.cliponaxis, {dflt: false}),

    marker: barAttrs.marker,

    hoverinfo: scatterPolarAttrs.hoverinfo,

    selected: barAttrs.selected,
    unselected: barAttrs.unselected

    // error_x (error_r, error_theta)
    // error_y
};

@@ -201,16 +201,73 @@
 rict';%0A%0A
+var extendFlat = require('../../lib/extend').extendFlat;%0A
 var scat
@@ -883,103 +883,1014 @@
 se: 
-barAttrs.base,%0A    offset: barAttrs.offset,%0A    width: barAttrs.width,%0A%0A    text: barAttrs.text
+extendFlat(%7B%7D, barAttrs.base, %7B%0A        description: %5B%0A            'Sets where the bar base is drawn (in radial axis units).',%0A            'In *stack* barmode,',%0A            'traces that set *base* will be excluded',%0A            'and drawn in *overlay* mode instead.'%0A        %5D.join(' ')%0A    %7D),%0A    offset: extendFlat(%7B%7D, barAttrs.offset, %7B%0A        description: %5B%0A            'Shifts the angular position where the bar is drawn',%0A            '(in *thetatunit* units).'%0A        %5D.join(' ')%0A    %7D),%0A    width: extendFlat(%7B%7D, barAttrs.width, %7B%0A        description: %5B%0A            'Sets the bar angular width (in *thetaunit* units).'%0A        %5D.join(' ')%0A    %7D),%0A%0A    text: extendFlat(%7B%7D, barAttrs.text, %7B%0A        description: %5B%0A            'Sets hover text elements associated with each bar.',%0A            'If a single string, the same string appears over all bars.',%0A            'If an array of string, the items are mapped in order to the',%0A            'this trace%5C's coordinates.'%0A        %5D.join(' ')%0A    %7D)
 ,%0A  

improve barpolar attribute descriptions