Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const chartSettings = {
- scales: {
- labels: 'true',
- y: {
- data: { field: 'Votes' },
- invert: true,
- include: [0]
- },
- t: { data: { extract: { field: 'Rating' } }, padding: 0.3 },
- },
- components: [{
- type: 'axis',
- dock: 'left',
- scale: 'y'
- }, {
- type: 'axis',
- dock: 'bottom',
- scale: 't'
- }, {
- key: 'bars',
- type: 'box',
- data: {
- extract: {
- field: 'Rating',
- props: {
- start: 0,
- end: { field: 'Votes' }
- }
- }
- },
- settings: {
- major: { scale: 't' },
- minor: { scale: 'y' }
- }
- },
- {
- type: 'text',
- text: 'Rating Score',
- layout: {
- dock: 'bottom'
- }
- },
- {
- type: 'text',
- text: 'Number of Votes',
- layout: {
- dock: 'left'
- }
- }]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement