Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. const chartSettings = {
  2. scales: {
  3. labels: 'true',
  4. y: {
  5. data: { field: 'Votes' },
  6. invert: true,
  7. include: [0]
  8. },
  9.  
  10. t: { data: { extract: { field: 'Rating' } }, padding: 0.3 },
  11. },
  12. components: [{
  13. type: 'axis',
  14. dock: 'left',
  15. scale: 'y'
  16. }, {
  17. type: 'axis',
  18. dock: 'bottom',
  19. scale: 't'
  20. }, {
  21. key: 'bars',
  22. type: 'box',
  23. data: {
  24. extract: {
  25. field: 'Rating',
  26. props: {
  27. start: 0,
  28. end: { field: 'Votes' }
  29. }
  30. }
  31. },
  32. settings: {
  33. major: { scale: 't' },
  34. minor: { scale: 'y' }
  35. }
  36. },
  37. {
  38. type: 'text',
  39. text: 'Rating Score',
  40. layout: {
  41. dock: 'bottom'
  42. }
  43. },
  44. {
  45. type: 'text',
  46. text: 'Number of Votes',
  47. layout: {
  48. dock: 'left'
  49. }
  50. }]
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement