javascript - chart.js data api options in html -
i've been trying create half doughnut using chart js library starting template chart options provided using html attributes:
<canvas id="mychart" class="ex-graph" width="200" height="200" data-chart="doughnut" data-value="[{ value: 230, color: '#1ca8dd', label: 'returning' }, { value: 130, color: '#1bc98e', label: 'new' }]" data-segment-stroke-color="#252830"></canvas>
the options want provide are:
options: { rotation: 1 * math.pi, circumference: 1 * math.pi }
so tried without success following:
<canvas class="ex-graph" width="200" height="200" data-chart="doughnut" data-value="[{ value: 230, color: '#1ca8dd', label: 'returning' }, { value: 130, color: '#1bc98e', label: 'new' }]" data-segment-stroke-color="#252830" data-options="[{ rotation: 1 * math.pi}, {circumference: 1 * math.pi }]" > </canvas>
is possible use options attribute html attribute?
Comments
Post a Comment