//-------------------------------------------------------------------
 public string GetLabel(CDonneesDeChart donnees)
 {
     if (m_formule != null)
     {
         return(m_formule.GetString());
     }
     return(LabelType);
 }
示例#2
0
        //-----------------------------------------
        public CChartSetup()
        {
            m_donnees = new CDonneesDeChart(this);
            CChartArea area = new CChartArea();

            area.AreaName = "Area 1";
            m_listeAreas.Add(area);

            CLegendArea legende = new CLegendArea();

            legende.LegendName = "Legend 1";
            m_listeLegendes.Add(legende);
        }
        //-------------------------------------------------------------------
        public string GetLabel(CDonneesDeChart donnees)
        {
            if (donnees == null)
            {
                return(LabelType);
            }
            CParametreSourceChart p = donnees.GetSourceFV(SourceId);

            StringBuilder bl = new StringBuilder();

            if (p != null)
            {
                bl.Append(p.SourceName);
            }
            else
            {
                bl.Append("?");
            }
            bl.Append(".");
            if (TableName.Length > 0)
            {
                bl.Append(TableName);
            }
            else
            {
                bl.Append("?");
            }
            bl.Append(".");
            if (ColumnName.Length > 0)
            {
                bl.Append(ColumnName);
            }
            else
            {
                bl.Append("?");
            }
            return(bl.ToString());
        }