김찌질
김찌질

Reputation: 25

How TChart point series bottom text hide?

I'm use TChart version .Net & VS2005.

The problem of adding a point series.

How TChart point series bottom text hide?

Help me please. Thank you. =)

My Code :

    private void GridNotch()
    {
        Steema.TeeChart.Styles.Points NotchPoint = new Steema.TeeChart.Styles.Points();
        TChart1.Series.Add(NotchPoint);

        Steema.TeeChart.Axis axis = new Steema.TeeChart.Axis();
        TChart1.Axes.Custom.Add(axis);

        axis.StartPosition = 5;
        axis.EndPosition = 5;

        axis.Labels.Items.Add(0, " ");
        axis.Labels.Items.Add(5000, " ");
        axis.Labels.Items[0].Visible = false;
        axis.Labels.Items[1].Visible = false;

        axis.Title.Caption = "";
        axis.Title.Font.Color = Color.Black;

        TChart1.Series[TChart1.Series.Count - 1].CustomVertAxis = axis;

        if (dt_Notch.Columns.Count == 0)
        {
            dt_Notch.Columns.Add("Value", typeof(int));
            dt_Notch.Columns.Add("Label", typeof(string));

            DataRow row;
            row = dt_Notch.NewRow();
            row["Value"] = "100";
            row["Label"] = "B5";
            dt_Notch.Rows.Add(row);
        }

        TChart1.Series[TChart1.Series.Count - 1].XValues.DataMember = "Value";
        TChart1.Series[TChart1.Series.Count - 1].YValues.DataMember = "Value";
        TChart1.Series[TChart1.Series.Count - 1].LabelMember = "Label";
        TChart1.Series[TChart1.Series.Count - 1].DataSource = dt_Notch;
    }

My Graph : enter image description here Want Graph : enter image description here

Upvotes: 0

Views: 378

Answers (1)

Yeray
Yeray

Reputation: 5039

I see you are assigning the "B5" in your code:

row["Label"] = "B5";

You can either remove that label or force your bottom axis to show values and not labels:

TChart1.Axes.Bottom.Labels.Style = AxisLabelStyle.Value;

Upvotes: 1

Related Questions