#Excel x axis data how to#
Here are some screenshots showing you how to load the example into your Excel. In the Select Data Source dialog, click OK. However, you can specify the following axis options: Interval between tick marks and labels.
#Excel x axis data code#
In the Axis Labels dialog, for Axis Label Range, enter the data range for Code (exclude the header, the first row). The horizontal (category) axis, also known as the x axis, of a chart displays text labels instead of numeric intervals and provides fewer scaling options than are available for a vertical (value) axis, also known as the y axis, of the chart. In the Select Data Source dialog, Edit the Horizontal (Category) Axis Labels. When the data is plotted the X axis goes to the generic 1, 2, 3, etc data points, instead of the actual data of 20.0, 70.0, 74.5, etc. My selected data set has 17 rows, but usually only has data in the first 5-7 rows. But first, of course, you need to insert the Funfun add-in into your Excel from Insert-Office add-ins. In the Select Data Source dialog, Remove the Code Series. I'm setting up a sheet to automatically plot data (2 data columns with a primary and secondary Y axis and common X axis data). Also, on the right side there are horizontal values (Category), which is Y. In the ‘Select Data Source’ dialog box, you can see vertical values (Series), which is X axis (Quantity). This way you can also change the data source for the chart. Once you are satisfied with your result in the online editor, you could easily load the result into your Excel (so you could see the chart and data directly in Excel) using the URL below. Below are the steps to do this: You need to right-click on one of the axes and choose Select Data. You could check the detailed code of this example on the link below. And it did extend the y-axis from 0 to 18, beyond my y-values of 9.5 to 15.5.
![excel x axis data excel x axis data](https://i.stack.imgur.com/yARJi.gif)
But Excel did extend the x-axis from 0 to 4. The only data are the 5 y-values associated with the 5 x-values that I highlighted in A2:B6. The Funfun also has an online editor in which you could explore with your JavaScript code and test the result. Excel did not really 'add data to the x-axis'. This is very easy to achieve in Chart.js since all you need to do is to set them as labels in the code. Here I made an example based on your problem and sample data.īased on your description, what you need to do is to make the data in the code column recognized as labels rather than real values. Inside the Format Axis options, change Automatically select based on data to Text axis. If you select the option ‘Axis Titles’, both horizontal and vertical axis titles appear in the graph area. In order to display dates and times correctly, right-click the horizontal axis and choose Format Axis.
#Excel x axis data plus#
Then click on the green plus sign located on the right-hand side of the graph. Now, the scatter chart looks like a line chart, with years on the X-axis. Click OK to accept changes in Edit Series and then click OK one more time.
![excel x axis data excel x axis data](https://i.stack.imgur.com/0rbDp.png)
This add-in allows you to use JavaScript code directly in Excel so you could use powerful libraries like Chart.js or D3.js to plot chart like this easily. First thing if you want to display the axis titles on a graph is to click anywhere within the graph area. In the Select Data Source window, click Edit. I propose to use the Funfun Excel add-in to do this.
![excel x axis data excel x axis data](https://saylordotorg.github.io/text_how-to-use-microsoft-excel-v1.1/section_08/fac75fd496297c084519d3b7a64c65cf.jpg)
Here is another solution for this or similar problem.