Problem: Some time we need to have different color on each bar.

Bar Chart

To achieve this I used kendo UI control. First of all you need to add required kendo reference. Then follow below steps.

Html Code:

  1. <div id="chart" style="width: 873px; height: 300px;">
  2. </div>
Client Script:
  1. //define your data here colorField is responsible changing the color of each bar
  2. var Pipelinedata = [{
  3. Name: "Pre",
  4. Value: 123,
  5. valueColor: "#BA55D3"
  6. }, {
  7. Name: "Application",
  8. Value: 124,
  9. valueColor: "#90EE90"
  10. }, {
  11. Name: "Not,
  12. Value: 35345,
  13. valueColor: "#DC143C"
  14. }
  15. ];
  16. art").kendoChart({
  17. theme: "silver",
  18. title: {
  19. text: "abc "
  20. },
  21. dataSource: {
  22. data: Pipelinedata
  23. },
  24. transitions: false,
  25. series: [{
  26. type: "column",
  27. field: "Value",
  28. colorField: "valueColor",
  29. labels: {
  30. visible: true,
  31. format: "{0:c0}"
  32. }
  33. }],
  34. categoryAxis: {
  35. field: "Name",
  36. labels: {
  37. color: "#293135"
  38. }
  39. },
  40. valueAxis: {
  41. labels: {
  42. template: "#= kendo.format('{0:N0}', value) # "
  43. },
  44. title: {
  45. text: "Dollars"
  46. }
  47. },
  48. tooltip: {
  49. visible: true,
  50. template: "#=kendo.format('{0:c0}', value)# "
  51. }
  52. });
If you find any difficulty please feel free to contact me.

Thanks
Kamal Samant