Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

By default, graphs are created in a very basic form: the series have no title, a default color and thickness (maybe not the one you prefer) is used for all of them, the axes have no title either, no legend is shown, etc. 

 

 

Code Block
languagepy
titleCustomizing charts

lineResults.Title = "Model results"
dataSeries.Title = "Measurements"
dataSeries.Color = Color.Red
dataSeries.Size = 4
dataSeries.LineVisible = True
dataSeries.LineColor = Color.Black
chart.BottomAxis.Title = "Time"
chart.LeftAxis.Title = "Waterlevel [m]"
chart.LeftAxis.Automatic = False
chart.LeftAxis.Maximum = 2
chart.LeftAxis.Minimum = 0
chart.Legend.Visible = True
chart.Legend.Alignment = LegendAlignment.Bottom
chart.Title = "Comparison measurements vs results"
chart.TitleVisible = True