Skip to main content
8-Gravel
Apr 9, 2024 1:49 AM UTC
Solved

Can I adjust padding of LineChart Widgets?

I have limitation of area 

I have to custom adjust padding

linechartissue1.png

and I have to set height of this (am not sure it's "svg" or "#chart")

linechartissue3.pnglinechartissue2.png

5-Regular Member
Apr 9, 2024 2:45 AM UTC

Hello @AL_10742319 ,

 

This is previously asked question and has been resolved. Kindly check the community post for the same:

https://community.ptc.com/t5/ThingWorx-Developers/Line-Chart-Padding-Issue/m-p/766252#M55995%3Fsource=search

 

also, you can try using the Custom CSS :

ptcs-chart-line::part(chart-layout) { 
 padding: <padding_value>; 
}

ptcs-chart-pareto::part(chart-layout) { 
  padding: <padding_value>; 
}

 

6 replies

5-Regular Member
Apr 9, 2024 2:45 AM UTC

Hello @AL_10742319 ,

 

This is previously asked question and has been resolved. Kindly check the community post for the same:

https://community.ptc.com/t5/ThingWorx-Developers/Line-Chart-Padding-Issue/m-p/766252#M55995%3Fsource=search

 

also, you can try using the Custom CSS :

ptcs-chart-line::part(chart-layout) { 
 padding: <padding_value>; 
}

ptcs-chart-pareto::part(chart-layout) { 
  padding: <padding_value>; 
}

 

Translate
8-Gravel
Apr 9, 2024 7:35 AM UTC

Thank you for answer!
now I can adjust using the Custom CSS :

ptcs-chart-line::part(chart-layout) { 
 padding: 0;
}

 padding: 0;

AL_10742319_1-1712648109084.png

 

 

Translate
Support
Apr 9, 2024 4:01 AM UTC

Hi @AL_10742319,

Have you enabled SparkView for Line Chart?

Have you tried configuring the paddings in Style Properties > chart-layout?

TonyZhang_0-1712635239396.png

 

Translate
8-Gravel
Apr 9, 2024 7:34 AM UTC

Thank you for answer!
I have enabled SparkView, but in Style Properties don't not have chart-layout 
AL_10742319_0-1712647909876.png

 

now I can adjust using the Custom CSS :

ptcs-chart-line::part(chart-layout) { 
 padding: 0;
}

 

Translate
Support
Apr 9, 2024 7:54 AM UTC

Great! looks like the padding is exposed through Style Properties > chart-layout since TWX 9.3.4, so it's not available in older versions. 

Translate