I would like to make a chart with 30 bars side by side. Each bar with a width of say 2px and a value 20px I have the following code:
and otui:
only one bar is shown on the chart.
I'm using otcv8.
Question: How can I make 30 bars side by side on a chart?
Lua:
function initBars()
local VisualizationContainer = VWindow:recursiveGetChildById('VisualizationContainer')
for i = 1, 30 do
local bar = g_ui.createWidget('UIWidget', VisualizationContainer)
bar:setBackgroundColor('#CC99FF')
bar:setHeight(20)
bar:setWidth(2)
table.insert(bars, bar)
end
end
and otui:
Code:
MiniWindow
id: VWindow
!text: tr('Chart')
height: 190
icon: /images/topButtons/inventory
@onClose: modules.game_chart.onMiniWindowClose()
&save: true
&autoOpen: 11
MiniWindowContents
padding-left: 5
padding-right: 5
layout: verticalBox
UIWidget
id: VisualizationContainer
height: 100
margin-top: 5
background-color: #FFFF00
only one bar is shown on the chart.
I'm using otcv8.
Question: How can I make 30 bars side by side on a chart?