d3.js - d3.scaleTime - ticks and arrangement
<p>I am plotting line graphs from values contained in an array. I have an array containing the indices for the x-axis and an array with values for the y-axis.</p>

<p>I started with x and y as linear scales. Now I changed the x-axis to a time scale because I want to have a second mark for every n elements. <code>n</code> is a variable that changes from plot to plot.</p>

<p>The plotting is still working with the time scale but the ticks disappeared.</p>

<p>How can i configure the ticks for the time scale in a way that it displays seconds.</p>

<p>This is my code for the x-axis so far:</p>

<pre><code>var xScale = d3.scaleTime().range([MARGINS.left, WIDTH - MARGINS.right]).domain([scaleMin, scaleMax]);
xAxis = d3.axisBottom(xScale)
        .ticks(10);
svg.append("g")
        .attr("class", "axis axis--x")
        .attr("transform", "translate(0," + (HEIGHT - MARGINS.bottom) + ")")
        .call(xAxis);
</code></pre>

<p>the arrays look like this:
data contains the values and scale the indices for the values.</p>

<pre><code>var data = [8458,8485,8502,8527,8578,8617,8638,8678,8712,8732,8783,8814,8780,8752,8750,8716,8677,8668,8647,8610,8589,8583,8579,8570,8546,8534,8526,8486,8453,8461,8466,8454,8449,8452,8450,8441,8431,8429,8435,8437,8421,8407,8418,8429,8423,8418,8421,8431,8446,8436]
var scale = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50]
</code></pre>