title: plotly : I want to include some pattern in the bars of a bar chart
body: <p>Language : JavaScript</p>
  
  <p>I want to include some patterns in my bars of bar chart. I dont see anything available in plotly by default to serve the purpose .</p>
  
  <p>So I tried getting hold of the "point" element in the dynamically generated "svg" component.And then create a "pattern" element. I thought after creating the inner pattern tag , i will able to set cusotom attributes. </p>
  
  <p>But its not working at all.</p>
  
  <p>Below is the code sample used :</p>
  
  <pre><code>var data = [{
    x: ['giraffes', 'orangutans', 'monkeys'],
    y: [20, 14, 23],
    type: 'bar'
  }];
  
  Plotly.newPlot('myDiv',data);
  
  var ticks = document.getElementsByClassName('point');
  for (var i = 0; i &lt; ticks.length; i += 1) {
            var patt = document.createElement("pattern");
            patt.setAttribute('patternTransform','rotate(30)');
            patt.setAttribute('patternUnits','userSpaceOnUse');
            patt.setAttribute('fill', 'red');
            ticks[i].appendChild(patt);
  
  }
  </code></pre>
  
  <p>And I am taking reference of the below "" tag which I found online somewhere..</p>
  
  <pre><code>&lt;pattern id="diagonal-stripes-4-8" x="0" y="0" width="8" height="8"    patternUnits="userSpaceOnUse" patternTransform="rotate(30)"&gt;
  &lt;rect x="0" y="0" width="4" height="8" style="stroke:none; fill:purple;" /&gt;
  &lt;/pattern&gt;
  </code></pre>