c# - Asp.net Chart doesn't show series name -
i have asp.net chart control using objectdatasource.everything ok.but couldn't show series name.
<asp:chart id="chartpaun" runat="server" height="150px" cssclass="border" width="525px"> <series> <asp:series name="1puan" yvaluetype="int32" labelborderdashstyle="notset" shadowoffset="0" isvalueshownaslabel="true" color="#d74949" charttype="bar" font="microsoft sans serif, 8pt, style=bold" legendtext="dsfsdf"> </asp:series> <asp:series name="2puan" yvaluetype="int32" labelborderdashstyle="notset" shadowoffset="0" isvalueshownaslabel="true" color="#ff8b5a" charttype="bar" font="microsoft sans serif, 8pt, style=bold"> </asp:series> <asp:series name="3puan" yvaluetype="int32" labelborderdashstyle="notset" shadowoffset="0" isvalueshownaslabel="true" color="#ffb234" charttype="bar" font="microsoft sans serif, 8pt, style=bold"> </asp:series> <asp:series name="4puan" yvaluetype="int32" labelborderdashstyle="notset" shadowoffset="0" isvalueshownaslabel="true" color="#a0db0d" charttype="bar" font="microsoft sans serif, 8pt, style=bold"> </asp:series> <asp:series name="5puan" yvaluetype="int32" labelborderdashstyle="notset" shadowoffset="0" isvalueshownaslabel="true" color="#9bda00" charttype="bar" font="microsoft sans serif, 8pt, style=bold"> </asp:series> </series> <chartareas> <asp:chartarea name="gosterimalan" alignmentorientation="all" alignmentstyle="axesview" area3dstyle-isclustered="true" area3dstyle-lightstyle="realistic"> <axisx linewidth="0" ismarginvisible="false" interval="1" enabled="true"> </axisx> <position height="100" width="100" x="30" y="0" /> <area3dstyle isclustered="true" lightstyle="realistic"></area3dstyle> </asp:chartarea> </chartareas> </asp:chart>
codebehind :
protected void page_load(object sender, eventargs e) { chartpaun.datasource = odspuandagilimi; chartpaun.series["1puan"].yvaluemembers = "birpuan"; chartpaun.series["2puan"].yvaluemembers = "ikipuan"; chartpaun.series["3puan"].yvaluemembers = "ucpuan"; chartpaun.series["4puan"].yvaluemembers = "dortpuan"; chartpaun.series["5puan"].yvaluemembers = "bespuan"; chartpaun.series["4puan"].smartlabelstyle.enabled = true; chartpaun.databind(); chartpaun.chartareas["gosterimalan"].axisy.majorgrid.enabled = false; chartpaun.chartareas["gosterimalan"].axisx.majorgrid.enabled = false; chartpaun.chartareas["gosterimalan"].axisy.linewidth = 0; chartpaun.chartareas["gosterimalan"].axisx.linewidth = 0; chartpaun.chartareas["gosterimalan"].axisx.labelstyle.enabled = false; chartpaun.chartareas["gosterimalan"].axisy.labelstyle.enabled = false; }
i didn't write objectdatasource codes. how can show series names ?and can set series name codebehind ?
Comments
Post a Comment