2016-03-31 23 views
1

Bir kimse angular-nvd3 lineChart'ın y ekseni için nasıl bir renk veya css sınıfı belirtileceğini söyleyebilir mi? Bir nesnenin tüm seçenekler var sonraangular-nvd3 çizgi-grafik ekseninin rengini değiştir

<nvd3 options="lineChartOptions" data="graphData" ></nvd3>

ve:

opsiyona belirterek oldum

$scope.lineChartOptions = { 
        chart: { 
         type: 'lineChart', 
         showLegend:false, 
         forceY:[0,5], // make y axis start at 0 to 5 
         forceX:[1,4], 
         // interpolate:"monotone", 
         height: 400, 
         width: 600, 
         margin : { 
          top: 20, 
          right: 20, 
          bottom: 40, 
          left: 55 
         }, 
         x: function(d){ return d.x; }, 
         y: function(d){ return d.y; }, 
         useInteractiveGuideline: true, 
         tooltip: { 
          contentGenerator: function(d) { return '<h3>HELLO WORLD</h3>'; } 
         }, 
         dispatch: { 
          stateChange: function(e){ console.log("stateChange"); }, 
          changeState: function(e){ console.log("changeState"); }, 
          tooltipShow: function(e){ console.log("tooltipShow"); }, 
          tooltipHide: function(e){ console.log("tooltipHide"); } 
         }, 
         xAxis: { 
          // axisLabel: 'Week', 
          ticks: 4, // make x-axis show all 4 weeks, 

          // tickFormat: function(d){ 
          // return "week " + d; 
          // } 
         }, 
         showYAxis: true, 
         yAxis: { 
          // axisLabel: 'Score', 
          // tickFormat: function(d){ 
          //  return d3.format('.02f')(d); 
          // }, 
          ticks: 6, 
          axisLabelDistance: -10 
         }, 
         callback: function(chart){ 
          //console.log("!!! lineChart callback !!!"); 
         } 
        }, 
        // title: { 
        //  enable: true, 
        //  text: 'Title for Line Chart' 
        // }, 
        // subtitle: { 
        //  enable: true, 
        //  text: 'Subtitle for simple line chart... ', 
        //  css: { 
        //   'text-align': 'center', 
        //   'margin': '10px 13px 0px 7px' 
        //  } 
        // }, 
        // caption: { 
        //  enable: true, 
        //  html: '<b>AND</b> we can put any sort of html here too...', 
        //  css: { 
        //   'text-align': 'justify', 
        //   'margin': '10px 13px 0px 7px' 
        //  } 
        // } 
       }; 

Ama ömrü boyunca çözemiyorum eksenler için bir renk nasıl belirtilir veya onay metinleri için bir css sınıfı nasıl belirtilir ...

Herhangi bir yardım büyük takdir ... Eğer css ile bunu yapabilirsiniz eksen y için

cevap

1

, şöyle:

.nvd3 .nv eksenli yolu {doldurun: # E5E5E5; inme: # E5E5E5; }

İlgili konular