How to display a line chart in HTML

How to make a line chart and histogram

Returns are often visualized as a line diagram (chart) to give a better overview of the development. It's very easy to do in Excel. We use the Dax development from 2013 to 2017 as the data series. You can find out how to get the data in my article How to import data into Excel.

The line chart in Excel

A simple line chart is shown over Insert / Diagrams / Line inserted. Now it is time to select the data. With a right click on the now inserted gray empty box and Select dates you get to the selection of the data sources. In the area Legend entries (rows) use the "Add" button to select your Y-axis. The name is optional. In our example, we choose the adjusted closing prices as the values. The date on the X-axis is displayed correctly if you click on To edit in the areaHorizontal axis labels (rubric) click and then select the appropriate date values. Right-click on the respective axes to format them accordingly.

 

 

The chart with the blue line provides the Development of the Dax in the period from 2013 to 2017. The orange line visualizes the daily returns in the same period. These fluctuate roughly around zero. However, it is not clear whether the returns are positive or negative. There is a so-called histogram for this.

 

 

The histogram in Excel

The histogram function is not activated by default. You can use the function under Options / add-ins / analysis functions activate. From now on you can find it under the tab Data / analysis a new button. There is that too histogram available. But first we have to define a class range. As you can see on the return chart above, the returns are mostly distributed within -5% and + 5%. To do this, manually create the desired classes in any column. I chose intervals of half a percent.

 

 

in the Input area the complete returns including description are selected. in the Class area the classes just created including their description. Choose where the data should be displayed under output. The hook Diagram creation draws the desired histogram.

This is what the result looks like for steady DAX returns in the period from 2013 to 2017

Last update on 05/17/2021 / Affiliate Links / Images from the Amazon Product Advertising API

Last update on 05/17/2021 / Affiliate Links / Images from the Amazon Product Advertising API