Ciao a tutti, sono qui a chiedere un vostro gentile aiuto.
Questa è una porzione di un codice net nel quale codebehind ho inserito la generazione di un grafico tramite la classe Chart Controls.
Il mio problema è la composizione della cosidetta `Legenda`.
Infatti se nell'attuale `Legenda` si visualizza correttamente il nome delle serie `s3` vorrei visualizzare nella stessa `Legenda` anche il valore restituito dalla query e cioè l'alias `Delta%`, anche se questo non viene pubblicato come colonna/serie di valori nel grafico stesso.
Non ci riesco, come posso fare? E' possibile?
Grazie tante
codice:
String strQuery = " SELECT " +
" tAnnoPrecedente" +
",provincia " +
",CONCAT(VariazionePercentuale,'%') As `Delta%` " +
" FROM tbl_m; ";
//ASSEGNO NOME ALLA NUOVA SERIE
DateTime dateTime = new DateTime(DateTime.Now.AddYears(-1).Year, 12, DateTime.Now.Day);
string s3 = dateTime.ToString("MMM yyy");
//INIZIALIZZO NUOVA SERIE
Chart1.Series.Add(s3);
Chart1.Series[s3].XValueMember = "provincia";
Chart1.Series[s3].YValueMembers = "tAnnoPrecedente";
......
//INIZIALIZZO NUOVA LEGENDA
Chart1.Legends.Add(new Legend(s3));
Chart1.Legends[s3].BackGradientStyle = GradientStyle.DiagonalLeft;
Chart1.Legends[s3].BorderColor = Color.Black;
Chart1.Legends[s3].BorderWidth = 2;
Chart1.Legends[s3].BorderDashStyle = ChartDashStyle.Solid;
Chart1.Legends[s3].ShadowOffset = 2;
Chart1.Legends[s3].Docking = Docking.Bottom;
Chart1.Legends[s3].Alignment = System.Drawing.StringAlignment.Center;
Chart1.Legends[s3].Font = new System.Drawing.Font("Verdana", 12, FontStyle.Bold);
//NUOVA LEGENDA
Chart1.Series[s3].Legend = s3;
P.S. : mi consigliate un testo degno di questo nome su cui approfondire la conoscenza di visual studio 2010? grazie