I created a chart using the dimple.js library with the following code:

```
var myChart = new dimple.chart(svg, data);
var x = myChart.addMeasureAxis("x", "x-measure");
x.tickFormat = "%";
var y = myChart.addMeasureAxis("y", "y-measure");
y.tickFormat = "%";
myChart.addSeries(["Attribute", "Category"], dimple.plot.scatter);
myChart.draw();
```

I'm trying to use d3 to select the x and y axes of the chart to alter them, but the html elements are pretty much identical, so I don't know how to select them individually. Using `d3.select('.dimple-axis').attr("id","x-axis");`

I've been able to add a unique identifier to the x-axis (the first element listed), but I have no way of selecting the y-axis.

Here's the HTML code:

X-Axis: `<g class="dimple-axis" transform="translate(0, 540)" id="x-axis" style="font-family: sans-serif; font-size: 10px;">...</g>`

Y-Axis: `<g class="dimple-axis" transform="translate(140, 0)" style="font-family: sans-serif; font-size: 10px;">...</g>`

Any ideas on how to add an unique id to the y-axis permanently, or somehow select it using d3?

Thanks!

Answer:1

I have a JavaScript associative array, say: var myArray = new Object(); myArray["id1"] = "completed"; myArray["id2"] = "notCompleted"; myArray["id3"] = "started"; How can I update value of each item ...

I have a JavaScript associative array, say: var myArray = new Object(); myArray["id1"] = "completed"; myArray["id2"] = "notCompleted"; myArray["id3"] = "started"; How can I update value of each item ...

- update each value in dictionary python
- php update each value in array
- c# update each value in dictionary
- python update each value
- sql update different value each row
- loadrunner update value on each occurrence
- c# update value of each item in list

How can i stop an request which is already being processing in backend ? I am using EXT Js Framework,There are two button , 1.Search button This button queries the back end and fetches the ...

How can i stop an request which is already being processing in backend ? I am using EXT Js Framework,There are two button , 1.Search button This button queries the back end and fetches the ...

I want to calculate the height from the top to the point where i have added link. How can i calculate height for example we use: w = $(window).height(); to calculate the height of window. ...

I want to calculate the height from the top to the point where i have added link. How can i calculate height for example we use: w = $(window).height(); to calculate the height of window. ...

- calculate height using weight and bmi
- calculate height using distance and angle
- calculate height using shadow
- calculate height using camera
- calculate height using ulna length
- calculate height using knee height
- calculate height using time
- calculate height using css
- calculate height using tangent
- calculate height using degrees
- calculate height using trigonometry
- calculate height using bmi
- calculate height using pressure
- calculate height using weight
- calculate height using ulna
- calculate height using angle
- calculate height using jquery
- calculate using height
- calculate height building using trigonometry
- calculate height mountain using trigonometry

I have a button on my page that, when clicked, will try to go out and download a file from a given URL on a different domain than my page's domain. Sometimes, that download URL will return an HTTP ...

I have a button on my page that, when clicked, will try to go out and download a file from a given URL on a different domain than my page's domain. Sometimes, that download URL will return an HTTP ...