0
我正在使用nvd3 stackedgroupchart,現在我已將單個X-Axis
列標籤更改爲多個。 另外我需要爲月份名稱添加輔助X-Axis
。我正在使用下面的鏈接nvd3 dual-axis in stackedgroupedChart
,我需要在X軸這樣添加個月的圖表,
現在我的X-Axis
根據以下代碼生成:
var xScale = d3.scale.ordinal()
.domain(d3.range(dataset.length))
.rangeRoundBands([0, width], 0.8);
var xAxis = d3.svg.axis()
.scale(xScale)
.tickFormat(function(d) { return dataset[d].shift; })
.orient("bottom");
請幫忙添加輔助標籤X軸,
由於事先
它工作正常。使用相同的示例數據,我怎樣才能轉換成以下格式:''nvd3 options ='options'data ='data'api =「api」config =「{refreshDataOnly:true,deepWatchData:true}」>'。我使用相同的[http://bl.ocks.org/gencay/4629518]圖 – satheesh
@satheesh提供jsFiddle。 –
我在[https://gist.github.com/gencay/4629518#file-index-html]中使用相同的代碼。我需要在自定義指令中顯示此圖。 – satheesh