c# - Chart control width with many series -


i have chart series in legend , chart docking fill in panel. legend has these properties:

chart1.legends.add(seriesname); chart1.legends[0].docking = docking.bottom; chart1.legends[0].tablestyle = legendtablestyle.wide; chart1.legends[0].bordercolor = color.cornflowerblue; chart1.legends[0].borderdashstyle = chartdashstyle.dash; chart1.legends[0].borderwidth = 1; 

chart few series:

enter image description here

with more series same interval date have result:

enter image description here

the issue not scale of data reduced size of chartarea itself.. - how can fix this?

the reason in line:

chart1.legends.add(seriesname); 

what adding 1 totally empty legend, for each of series add. placed @ default position, right. , if enough of them push chartarea left..

simply remove line, series added default legend anyway. default legend next lines style , position docked bottom.

to demostrate effect can add legenditem each:

legend l = chart1.legends.add(chart1.legends.count + "")); l.customitems.add(color.hotpink, chart1.legends.count + " *"); 

result:

enter image description here

as can see few legends push chartarea way left. yours empty, don't take musch room, still..


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -