1

I'm using a chart (System.Web.Helpers.Chart) and I'm saving it to a folder as a PNG. This is the chart

I would like to customise the styling so that I can remove the text + border at the bottom and the left side, so I literally only have the red line. Is there any way to do this?

enter image description here

TaW
  • 53,122
  • 8
  • 69
  • 111
Matt Ward
  • 1,095
  • 1
  • 14
  • 28
  • " the text + border at the bottom and the left side"...these are called the "axes" of a chart. But think about it...if you remove the axes, it's just a red line. it's not a chart any more. No-one can understand what the line represents because they can't see any of the values. Why would you want to do that? It makes it meaningless to the person viewing it. – ADyson Jun 13 '18 at 12:30
  • 1
    I've found that you can change the appearance of the chart by using `ChartTheme.*Colour*`. – Matt Ward Jun 13 '18 at 12:34
  • 1
    If you go to the definition of ChartTheme, it gives the string: `"\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n";` – Matt Ward Jun 13 '18 at 12:34
  • 1
    I want the chart to be minimal so that they can click it and go to the big chart, as this is meant to fit in a small table. – Matt Ward Jun 13 '18 at 12:34
  • even if you can hide the axes, they're just hidden, the chart image will still be the same physical dimensions. You might be better just physically making it smaller and maybe reducing the intervals at which the axes show values (to make it neater), if that doesn't happen automatically. – ADyson Jun 13 '18 at 12:36
  • But if you really want to, see this... https://stackoverflow.com/questions/9626234/asp-net-chart-control-hide-all-lines-axes-etc-except-data-points (I googled "asp.net chart hide axes" - this is nothing to do with borders or themes) – ADyson Jun 13 '18 at 12:39
  • For a MSChart: You can disable the two axes (someaxis.Enabled = false) to take it all out (axis, tick and labels) or do it one by one. To make the line disappear make the line color transparent. – TaW Jun 13 '18 at 13:31

0 Answers0