echarts柱状图,改变柱颜色,x轴,y轴,底部按钮文字颜色

Myth丶恋晨 2021-09-20 02:20 1225阅读 0赞

不墨迹直接上图:

watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQyMDQzMzc3_size_16_color_FFFFFF_t_70

下面上代码:

  1. xAxis: {
  2. type: 'category',
  3. //设置坐标轴字体颜色和宽度
  4. axisLine: { //这是x轴文字颜色
  5. lineStyle: {
  6. color: "#fff",
  7. }
  8. }
  9. },
  10. yAxis: {
  11. type: 'value',
  12. //设置坐标轴字体颜色和宽度
  13. axisLine: {//这是y轴文字颜色
  14. lineStyle: {
  15. color: "#fff",
  16. }
  17. }
  18. //下面是柱子的颜色
  19. series: [
  20. {
  21. type: 'bar',
  22. itemStyle:{
  23. normal:{color:'#fff'}
  24. },
  25. label: {
  26. normal: {
  27. show: true,
  28. position: 'top'
  29. }
  30. },
  31. },
  32. {
  33. type: 'bar',
  34. itemStyle:{
  35. normal:{color:'#eee'}
  36. },
  37. label: {
  38. normal: {
  39. show: true,
  40. position: 'top'
  41. }
  42. },
  43. },
  44. {
  45. type: 'bar',
  46. itemStyle:{
  47. normal:{color:'#aaa'}
  48. },
  49. label: {
  50. normal: {
  51. show: true,
  52. position: 'top'
  53. }
  54. },
  55. }
  56. ]
  57. //下面是标题颜色
  58. title: {
  59. text: '时间',
  60. x:'center',
  61. textStyle: {//标题颜色
  62. color: "#fff"
  63. }
  64. },
  65. //下面是按钮文字颜色
  66. legend: {
  67. bottom: 10,
  68. textStyle: {
  69. color: "#fff"
  70. }
  71. },

发表评论

表情:
评论列表 (有 0 条评论,1225人围观)

还没有评论,来说两句吧...

相关阅读