Forum Discussion
Line Charts generated from time-series data compress datapoints from each day into a single chunk
Hello,
For my job, I need to generate a lot of charts to show how the temperature, pH, water flowrate, etc etc all change over time, so I create lot of line graphs for time-series data. However, for some reason, "Line Charts" don't work. Specifically, if I select a dataset and insert a "Line Chart", the generated chart crunches all the datapoints for each day onto 12:00 PM of that day on the X axis, with the end effect being that the graph looks like a bunch of vertical lines connected by random oblique lines between them. This makes the chart illegible, as it essentially makes a screwed up version of a box and whisker plot. I've tried tweaking settings on "Line Charts" I've generated to make them display the data as a line chart, but I've never been able to make it work. Therefore, I instead always generate an XY Scatter plot and manually tweak it until it becomes a line chart. See below image for what I mean - it's a "Line Chart" and an XY Scatter Plot (with several tweaks) both generated for the same dataset:
(And here is a link to the excel sheet I used to generate the above two graphs: https://www.dropbox.com/s/81sapv9s2fkos8j/line_graph_demonstration.xlsx?dl=0 )
Of course, I can generate line charts by generating XY Scatter Plots, manually editing the min/max X axis values, then tweaking the major X axis value until the labels aren't mashed into potatoes, but this wastes a lot of time and introduces a lot more ways for me to screw up or make something inconsistent, especially when there's 10+ charts and halfway through the guy I'm making them for says "actually, could you grab data for last month too?"
So, is there a way to use "Line Charts" to generate... line charts? Because surely the "Line Charts" I generate aren't what Line Charts are supposed to be! It makes me think I must be using Excel wrong somehow, because I can't imagine that the simplest way to generate a line chart in Excel is to generate an XY Scatter Plot and spend a bunch of time screwing with the X axis.
1 Reply
- JoeUser2004Bronze Contributor
Perhaps if you google ``excel line charts support`` without quotes and read the webpage "Present your data in a scatter chart or a line chart" (click here), it will answer your question. Certainly not well-written. The gist is....
What you see is by design.
``[A] line chart only has one value axis (the vertical axis). The horizontal axis of a line chart only shows evenly spaced groupings (categories) of data. Because categories were not provided in the data, they were automatically generated, for example, 1, 2, 3, and so on.``
``As a general rule, use a line chart if your data has non-numeric x values — for numeric x values, it is usually better to use a scatter chart.``