Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I'm looking for a way to put marks on the axes next to each legend on the axis line, but I do not see the shape.

All help is appreciated.

Thank you
--------------
Estoy buscando la forma de poner marcas en los ejes junto a cada leyenda en la linea del eje, pero no veo la forma.

Toda ayuda se agradece.

Gracias

What I have tried:

I do not find information about it and the only thing I have thought for now is to add a line with values 0 in each point, but the series comes out in the legends and is not valid either.
----------------
No encuentro informacion al respecto y lo unico que he pensado por ahora es añadir una linea con valores 0 en cada punto, pero la serie sale en las leyendas y tampoco es valido.
Posted
Updated 14-May-18 13:35pm
Comments
Christian Graus 14-May-18 19:19pm    
C# does not contain charting components. What charts are you using?

I am using a similar code to generate the points of the axis, it differs in that the points I add them by means of a for.
I need to eliminate the legend and enlarge the points, any suggestions?
-------------------
Estoy utilizando un código similar para generar los puntos del eje, difiere en que los puntos los añado mediante un for.
Me falta eliminar la leyenda y agrandar los puntos, alguna sugerencia?

//Añade marcas en ejes
string EjeX2 = "X2";
chart1.Series.Add(EjeX2);
chart1.Series[EjeX2].Color = Color.Black;
chart1.Series[EjeX2].XAxisType = System.Windows.Forms.DataVisualization.Charting.AxisType.Secondary;
chart1.Series[EjeX2].Color = Color.Black;
chart1.Series[EjeX2].ChartType = SeriesChartType.Point;
chart1.Series[EjeX2].BorderWidth = 20;

chart1.Series[EjeX2].Points.AddXY(0.1, ESCALAY_MAX);
chart1.Series[EjeX2].Points.AddXY(0.5, ESCALAY_MAX);
chart1.Series[EjeX2].Points.AddXY(1, ESCALAY_MAX);
chart1.Series[EjeX2].Points.AddXY(5, ESCALAY_MAX);
chart1.Series[EjeX2].Points.AddXY(10, ESCALAY_MAX);
chart1.Series[EjeX2].Points.AddXY(50, ESCALAY_MAX);
chart1.Series[EjeX2].Points.AddXY(100, ESCALAY_MAX);
 
Share this answer
 
Comments
Richard Deeming 15-May-18 12:52pm    
If you want to update your question, click the green "Improve question" link and update your question.#

DO NOT post your update as a "solution". And definitely DO NOT mark your update as the accepted "answer" to your question!
I am using a similar code to generate the points of the axis, it differs in that the points I add them by means of a for.
I need to eliminate the legend and enlarge the points, any suggestions?
--------------------
Estoy utilizando un código similar para generar los puntos del eje, difiere en que los puntos los añado mediante un for.
Me falta eliminar la leyenda y agrandar los puntos, alguna sugerencia?

string MarcasEjeX2 = "X2";
chart1.Series.Add(MarcasEjeX2);
chart1.Series[MarcasEjeX2].XAxisType = System.Windows.Forms.DataVisualization.Charting.AxisType.Secondary;
chart1.Series[MarcasEjeX2].Color = Color.Black;
chart1.Series[MarcasEjeX2].ChartType = SeriesChartType.Point;
chart1.Series[MarcasEjeX2].BorderWidth = 20;

for (int i = 0; i < ValoresSerieLogaritmica.GetLength(0); i++)
{
if (ESCALAX_MIN <= ValoresSerieLogaritmica[i] && ValoresSerieLogaritmica[i] <= ESCALAX_MAX) { chart1.Series[MarcasEjeX].Points.AddXY(ValoresSerieLogaritmica[i], ESCALAY_MIN); }
if (ESCALAX2_MIN <= ValoresSerieLogaritmica[i] && ValoresSerieLogaritmica[i] <= ESCALAX2_MAX) { chart1.Series[MarcasEjeX2].Points.AddXY(ValoresSerieLogaritmica[i], ESCALAY_MAX); }
if (ESCALAY_MIN <= ValoresSerieLogaritmica[i] && ValoresSerieLogaritmica[i] <= ESCALAY_MAX) { chart1.Series[MarcasEjeY].Points.AddXY(((ESCALAX_MIN > ESCALAX2_MIN) ? ESCALAX_MIN : ESCALAX2_MIN), ValoresSerieLogaritmica[i]); }
}
 
Share this answer
 
string MarcasEjeX2 = "X2";
chart1.Series.Add(MarcasEjeX2);
chart1.Series[MarcasEjeX2].XAxisType = System.Windows.Forms.DataVisualization.Charting.AxisType.Secondary;
chart1.Series[MarcasEjeX2].Color = Color.Transparent;
chart1.Series[MarcasEjeX2].ChartType = SeriesChartType.Point;
chart1.Series[MarcasEjeX2].BorderWidth = 0;
chart1.Series[MarcasEjeX2].MarkerStyle = MarkerStyle.Diamond;
chart1.Series[MarcasEjeX2].MarkerColor = Color.Black;
chart1.Series[MarcasEjeX2].MarkerBorderColor = Color.Black;
chart1.Series[MarcasEjeX2].MarkerSize = 7;
chart1.Series[MarcasEjeX2].IsVisibleInLegend = false;

RESUELTO
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900