This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS: GUI Composer: could not change size of ti_widget_plot

Tool/software: Code Composer Studio

Hello E2E Team,

I am designing an App with the ti_widget_plot. I could define the size of the widget, but the plot does not follow these size. The following figure shows the plot in the designer. The widget size is larger (see frame).

During runtime, I checked the Atribute in the Inspector:

Even if i change the width in the inspector, after the next call of

Plotly.extendTraces(templateObj.$.ti_widget_plot.$.plot, update, [0,1,2,3]);

The width is set back to 700px.

Is the width of 700px  and height of 400 px somwere hardcoded? Or is that a default valuewhich can be overwritten?

Here is the js implementation of the plot binding and update:

            templateObj.$.ti_widget_plot.data = [line0,line1,line2,line3];
            templateObj.$.ti_widget_plot.layout = {
                margin: {
                    t: 0
                }
            };
            templateObj.$.ti_widget_plot.config = config = {
                'linkText': "name of graph",
                'scrollZoom': true,
                'displayModeBar': true,
                'editable': true,
                'width' : "1000px"
            };
            templateObj.$.ti_widget_plot.redraw();
            var cnt = 0;

            var interval = setInterval(function() {
                cnt++;
                var update = {
                    x: [[cnt],[cnt],[cnt],[cnt]],
                    y: [[document.getElementById('ti_tile_meter_HV_I').value],
                        [document.getElementById('ti_tile_meter_HV_U').value],
                        [document.getElementById('ti_widget_gauge3').value],
                        [document.getElementById('ti_widget_gauge4').value]]
                };
               

                Plotly.extendTraces(templateObj.$.ti_widget_plot.$.plot, update, [0,1,2,3]);
            },1000);

Thanks

Erik