2016-08-30 2 views

답변

-1

여러 데이터 세트를 만들 수 있습니다. 2004 하나 2014 하나는 에 대한 예제 코드가있다 : 나는 같은했습니다 http://www.chartjs.org/docs/

var data = { 
labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"], 
    datasets: [ 
     { 
      label: "My First dataset", 
      backgroundColor: "rgba(179,181,198,0.2)", 
      borderColor: "rgba(179,181,198,1)", 
      pointBackgroundColor: "rgba(179,181,198,1)", 
      pointBorderColor: "#fff", 
      pointHoverBackgroundColor: "#fff", 
      pointHoverBorderColor: "rgba(179,181,198,1)", 
      data: [65, 59, 90, 81, 56, 55, 40] 
     }, 
     { 
      label: "My Second dataset", 
      backgroundColor: "rgba(255,99,132,0.2)", 
      borderColor: "rgba(255,99,132,1)", 
      pointBackgroundColor: "rgba(255,99,132,1)", 
      pointBorderColor: "#fff", 
      pointHoverBackgroundColor: "#fff", 
      pointHoverBorderColor: "rgba(255,99,132,1)", 
      data: [28, 48, 40, 19, 96, 27, 100] 
     } 
    ] 
}; 

,하지만 난 그 순간에 스크린 샷을 게시 할 수 없습니다.

+0

당신은 각 막대의 색이 달라야한다는 것을 알았습니다. 해당 그룹 "길"을 사용하면 막대 색상은 2 가지 색상으로 만 나타납니다. –

+0

왜 다른 색상을 사용해야합니까? – andii1997

관련 문제