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:
with more series same interval date have result:
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:
as can see few legends
push chartarea
way left. yours empty, don't take musch room, still..
Comments
Post a Comment