<head>
  <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>
<body>
  <div id="graph"></div>
</body>
Plotly.plot('graph', [{
  type: 'pie',
  labels: ['a', 'b', 'c'],
  values: [10, 20, 10],
  text: [
    '<span style="color:green">this text is green</span>',
    '<span style="color:red">this text is red</span>',
    '<span style="color:blue">this text is blue</span>'
  ]
}])
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.