title: How can I add advanced styles to my Excel Line Chart Using Python & Openpyxl
body: <p>Below is the code and the resulting Excel chart generated using Python's Openpyxl Package.<br>
  Also below is the chart I would like the result to look like
  How can I add the following things to the graph? I've circled in red the features of the graph I wanted to add.</p>
  
  <ol>
  <li><p>Dashed rectangular drop lines from each data point extending to the X axis of the graph.</p></li>
  <li><p>Left justified title alignment with 2 separate fonts/sizes (1 font set for "Title", seperate font set for "Title2" &amp; "Title3")</p></li>
  <li><p>Multiple Floating text boxes below the graphs (See ***Notes1,2,3 at the bottom)</p></li>
  </ol>
  
  <p><strong>Code</strong></p>
  
  <pre><code>import openpyxl
  from openpyxl.chart import LineChart,Reference 
  from openpyxl.chart.label import DataLabelList
  from openpyxl.chart.text import RichText
  from openpyxl.drawing.text import Paragraph, ParagraphProperties, CharacterProperties, Font    
  
  
  excel = "Template.xlsx"
  
  excel_file = openpyxl.load_workbook(excel)
  
  Output_Sheet = excel_file.get_sheet_by_name('Sheet1')
  
  excel_file.save("Template2.xlsx")
  
  #Define data
  data = Reference(Output_Sheet, min_col = 25, min_row = 5, 
                           max_col = 25, max_row = 15) 
  
  #Define category
  categories = Reference(Output_Sheet, min_col = 23, min_row = 5, 
                           max_col = 24, max_row = 15) 
  #Initialize
  chart = LineChart() 
  
  #add Data
  chart.add_data(data) 
  
  #Add category
  chart.set_categories(categories)
  
  #Define title
  chart.title = " Title \n Title2 \n Title3"
  
  # set the title of the x-axis 
  
  # set the title of the y-axis 
  chart.y_axis.title = "Revenue "
  
  #Define chart and font
  font_test = Font(typeface='Avenir LT Std 55 Roman')
  cp = CharacterProperties(latin=font_test, sz=1500)
  chart.x_axis.txPr = RichText(p=[Paragraph(pPr=ParagraphProperties(defRPr=cp), endParaRPr=cp)])
  chart.y_axis.txPr = RichText(p=[Paragraph(pPr=ParagraphProperties(defRPr=cp), endParaRPr=cp)])
  chart.title.txPr = RichText(p=[Paragraph(pPr=ParagraphProperties(defRPr=cp), endParaRPr=cp)])
  
  #Size
  chart.height = 17.5 # default is 7.5
  chart.width = 40 # default is 15
  
  #Remove legend
  chart.legend = None
  
  s2 = chart.series[0]
  s2.smooth = True # Make the line smooth
  
  #Show Data Label
  chart.dataLabels = DataLabelList() 
  chart.dataLabels.showVal = True
  
  #Define font and size
  font_test = Font(typeface='Avenir LT Std 55 Roman')
  cp = CharacterProperties(latin=font_test, sz=750)
  
  chart.dataLabels.txPr = RichText(p=[Paragraph(pPr=ParagraphProperties(defRPr=cp), endParaRPr=cp)])
  
  #Add Chart
  Output_Sheet.add_chart(chart, "B18") 
  
  # save the file 
  excel_file.save("Template2.xlsx")
  </code></pre>
  
  <p><strong>Current output</strong></p>
  
  <p><img src="https://i.stack.imgur.com/qBIdk.png" alt="enter image description here"></p>
  
  <p><strong>Desired Output</strong></p>
  
  <p><img src="https://i.stack.imgur.com/ja54T.png" alt="enter image description here"></p>