Graph does not appear on the mobile screen

Asked

Viewed 76 times

1

In the development of an application, I am filling a chart as the end result of user data entries.

The main point is that, as I will present in the following code, I have a FOR that will fill each point based on the calculations already programmed. If I place the program’s XYPLOT inside the FOR, the graph exits correctly, but the caption displays 100 times each plotted point. (The FOR is divided into 100 points and each point has to be plotted on the graph). Now, if I put the plot code outside of the FOR, the caption comes out correctly, but the graph is not plotted.

Can anyone help?! Thank you!

Plot code within FOR

deformacao_aco_compressao_variavel_dominio1 = 0.01;

        for (i=0; i<100; i++){

            Normal_dominio1 = this.Normal_Aco_Compressao_Dominio1() + this.Normal_Aco_Tracao_Dominio1();

            Normal_vetor_dominio1[i] = Normal_dominio1;

            Momento_dominio1 = this.Momento_Aco_Compressao_Dominio1() + this.Momento_Aco_Tracao_Dominio1();

            Momento_vetor_dominio1[i] = Momento_dominio1;

            // Código para plotar o gráfico
            XYSeries dominio1 = new SimpleXYSeries(Arrays.asList(this.Normal_vetor_dominio1[i]), Arrays.asList(this.Momento_vetor_dominio1[i]),  "D.1");
            LineAndPointFormatter dominio1Format = new LineAndPointFormatter(Color.GREEN, Color.GREEN, Color.GREEN, null);
            graph.addSeries(dominio1, dominio1Format);

            deformacao_aco_compressao_variavel_dominio1 = deformacao_aco_compressao_variavel_dominio1 - (0.01 - this.Deformacao_Aco_Compressao_Dominio1()) / 100;

        }

How do you get the plotting code inside the FOR inserir a descrição da imagem aqui

How do you get the plot code out of FOR

inserir a descrição da imagem aqui

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.