2017-01-09 6 views
0

그래프를 그리려는 것 같습니다. 나는 이미 내가 할 수 그릴 수 있도록 내 프로젝트에 차트 JS 라이브러리가이 그래프를 사용하여 차트 JS차트 js를 사용하여 아래 그림과 같이 그릴 수 있습니다.

enter image description here

방법이 그래프를 그리는 나에게 알려 주시기 바랍니다. 다른 라이브러리를 제안 해주십시오 차트 JS와 가능하지 않은 경우

+0

을 가지고 사용할 수 있습니다 .js – Mox

+0

@mox 바이올린을 통해 공유 할 수 있습니까? – Arunkumar

+0

몇 달 전에 물어 본 질문을 살펴보십시오. 아마도 그 솔루션을 urs에 적용 할 수 있습니다. http://stackoverflow.com/questions/35197463/how-to-remove-the-padding-on-the-both-ends-of-the-highchart – Mox

답변

0

당신은 Highcharts-ng를 각도로 나는이 사용 highchart 같은 짓을 가지고 갠트 차트 기능

var chart = new Highcharts.Chart({ 
      chart: { 
       renderTo: 'container' 
      }, 

      title: { 
       text: 'SOTMP Checklist Compliance History' 
      }, 

      xAxis: { 
       type: 'datetime' 
      }, 

      yAxis: { 

       categories: ['Category 9', 
          'Category 8', 
          'Category 7', 
          'Category 6', 
          'Category 5', 
          'Category 4', 
          'Category 3', 
          'Category 2', 
          'Category 1'], 
       tickInterval: 1,    
       tickPixelInterval: 200, 
       labels: { 
        style: { 
         color: '#525151', 
         font: '12px Helvetica', 
         fontWeight: 'bold' 
        }, 
        /* formatter: function() { 
         if (tasks[this.value]) { 
          return tasks[this.value].name; 
         } 
        }*/ 
       }, 
       startOnTick: false, 
       endOnTick: false, 
       title: { 
        text: 'Criteria' 
       }, 
       minPadding: 0.2, 
       maxPadding: 0.2, 
        fontSize:'15px' 

      }, 

      legend: { 
       enabled: false 
      }, 
      tooltip: { 
       formatter: function() { 
        return '<b>'+ tasks[this.y].name + '</b><br/>' + 
         Highcharts.dateFormat('%m-%d-%Y', this.point.options.from) + 
         ' - ' + Highcharts.dateFormat('%m-%d-%Y', this.point.options.to); 
       } 
      }, 

      plotOptions: { 
       line: { 
        lineWidth: 10, 
        marker: { 
         enabled: false 
        }, 
        dataLabels: { 
         enabled: true, 
         align: 'left', 
         formatter: function() { 
          return this.point.options && this.point.options.label; 
         } 
        } 
       } 
      }, 

      series: series 

     });   

DEMO

+0

highcharts는 오픈 소스가 아닙니다. 몇 가지 오픈 소스를 제안 할 수 있습니까? – Arunkumar

+0

지시문을 작성해야 할 수도 있습니다. 그렇지 않으면 라이브러리 각도 갠트를 사용할 수 있습니다 – Sajeetharan

관련 문제