Я много раз пытался вставить график с помощью CSS/HTML/TWIG в поле Drupal View. Проблема в том, что когда я помещаю код в область текстового поля, style="width: {{ act_time_needed }}%;", он не появляется. В чем проблема и как лучше всего ее решить?
Actual Time Needed ({{ actual_time_needed }} hours)
Tech Senior Developer ({{ tech_senior_time }} hours)
.graph-container {
width: 100%; /* Full width */
background-color: #f3f3f3; /* Background color of the container */
border-radius: 5px; /* Rounded corners */
overflow: hidden; /* Prevent overflow */
margin-bottom: 20px; /* Space below the graph */
}
.graph-bar {
height: 30px; /* Height of each bar */
background-color: #4CAF50; /* Color for the bars */
text-align: center; /* Center the text */
line-height: 30px; /* Center the text vertically */
color: white; /* Text color */
font-weight: bold; /* Make text bold */
transition: width 0.3s ease; /* Smooth transition for width change */
}
Я проверил в инструментах разработки и на веб-сайте.
Я много раз пытался вставить график с помощью CSS/HTML/TWIG в поле Drupal View. Проблема в том, что когда я помещаю код в область текстового поля, style="width: {{ act_time_needed }}%;", он не появляется. В чем проблема и как лучше всего ее решить? [code]
Actual Time Needed ({{ actual_time_needed }} hours)
.graph-container { width: 100%; /* Full width */ background-color: #f3f3f3; /* Background color of the container */ border-radius: 5px; /* Rounded corners */ overflow: hidden; /* Prevent overflow */ margin-bottom: 20px; /* Space below the graph */ }
.graph-bar { height: 30px; /* Height of each bar */ background-color: #4CAF50; /* Color for the bars */ text-align: center; /* Center the text */ line-height: 30px; /* Center the text vertically */ color: white; /* Text color */ font-weight: bold; /* Make text bold */ transition: width 0.3s ease; /* Smooth transition for width change */ } [/code] Я проверил в инструментах разработки и на веб-сайте.