If I have the following chart, how do I make x-axis a logarithmic scale?
https://jsfiddle.net/1p4wm84m/14/
[x = d3.scale.linear().range([0, w])]
If I change the above code to log(), the x-axis doesn't render correctly.
[x = d3.scale.log().range([0, w])]
Any tips or advice would be appreciated.
Related
I made recently a Scatter chart, basically a simple line, but where I could define the data on both axis, Y and X.
Now I need to do the same but with a bar chart, and for what I am seeing, I Can only put labels on the X-axis in a bar chart, is there a way to actual put data on both axis?
In my scatter type chart I had the data as array of [{y: .., x: ..}]
Any way to achieve this in a bar chart? thank you
I have created a subplot with plotly.JS , x axis is shared for each graph as given in the below picture.
I want to show the x axis values for all graphs in the subplot instead for showing it only for graph at bottom. I achieved this using anchor attribute, but the graphs are not aligned well. Look at the below picture, here 600 of graph2 is not positioned exactly to the other two graphs.
I want all the graph to share x axis as well as show the x axis values on each graph.
How to configure the no of ticks on nvd3 line chart axis.
I know that we can have no of tick count on d3 chart using following
var axis = d3.svg.axis().ticks([NO_of_Tick]).scale(widthscale);
How this can be done for nvd3 line chart.
If you want to show all your xAxis tick values by default try using :
nv.models.multiBarChart().reduceXTicks(false);
Or if you want to show only certain tick values on your xAxis you could try this:
// Assuming your xAxis has 1-10
chart.xAxis.tickValues([1,2,3,4,5,6,7,8,9,10])
Hope it helps.
I'm trying to add axis labels to a NVD3 Multi-Bar Chart, but it only seems to work for the x axis. Is there any way around this?
I have set up an example here: http://jsfiddle.net/msts1jha/2/
var chart = nv.models.multiBarChart();
chart.xAxis
.tickFormat(d3.format(',f'));
chart.yAxis
.tickFormat(d3.format(',.1f'));
chart.xAxis.axisLabel("x axis");
chart.yAxis.axisLabel("y axis");
Your yAxis is hidden, set the left margin on your chart, and it will work.
Try this :
var chart = nv.models.multiBarChart().margin({left: 100});
More info regarding margins have a look here
Hope it helps
working on high charts. Need to update dual x axis, but only one data sereies has to scale and on tool tip has to show dual x axis values with legends.