Robert Jaros
10/07/2019, 8:51 AMRobert Jaros
10/09/2019, 8:32 AMaChart.configuration = ....
with new Configuration
object containing new data should work
so I would try to:
1. create a helper function to get current configuration:
fun getChartConfig() = Configuration(
ChartType.PIE,
listOf(
DataSets(
data = pieSizes
)
)
)
2. create a chart with the help of this function:
val aChart = Chart(getChartConfig())
3. subscribe to the observable list:
pieSizes.onUpdate += {
aChart.configuration = getChartConfig()
}
Diogo Ribeiro
10/11/2019, 11:18 AMRobert Jaros
10/11/2019, 11:36 AMMikael
10/29/2019, 10:31 AMRobert Jaros
01/08/2020, 5:57 PMLars Erik Rojeras
01/17/2020, 10:38 AMBig Chungus
01/17/2020, 1:09 PMBig Chungus
01/17/2020, 9:13 PMBig Chungus
01/19/2020, 7:52 PMRobert Jaros
01/31/2020, 8:25 AMgetData()
. Without serialization requirement you would have to pass some kind of factory function. I don't know any other way to construct a generic type object.Robert Jaros
02/14/2020, 9:15 AMRobert Jaros
05/01/2020, 10:38 PMRobert Jaros
05/13/2020, 5:47 PMRobert Jaros
06/26/2020, 1:51 PMRobert Jaros
06/30/2020, 6:42 PMRobert Jaros
07/04/2020, 9:44 AMRobert Jaros
07/28/2020, 6:34 PMRobert Jaros
07/28/2020, 6:36 PMRobert Jaros
08/09/2020, 9:19 AMLars Erik Rojeras
08/21/2020, 1:14 PMTabulatorTab.kt
from the showcase:Lars Erik Rojeras
08/21/2020, 1:16 PMpackage com.example
import pl.treksoft.kvision.panel.SimplePanel
import pl.treksoft.kvision.state.observableListOf
import pl.treksoft.kvision.tabulator.ColumnDefinition
import pl.treksoft.kvision.tabulator.Editor
import pl.treksoft.kvision.tabulator.Layout
import pl.treksoft.kvision.tabulator.TabulatorOptions
import pl.treksoft.kvision.tabulator.tabulator
import pl.treksoft.kvision.utils.px
data class Employee(
val name: String?
) {
companion object {
internal var counter = 0
}
}
class TabulatorTab : SimplePanel() {
val data = observableListOf(
Employee(
"Tiger Nixon"
),
Employee(
"Garrett Winters"
),
Employee(
"Ashton Cox"
)
)
init {
this.marginTop = 10.px
tabulator(data,
options = TabulatorOptions(
layout = Layout.FITCOLUMNS,
columns = listOf(
ColumnDefinition(
"Name 1",
"name",
headerFilter = Editor.INPUT,
headerFilterPlaceholder = "Text 1"
)
)
)
)
tabulator(data,
options = TabulatorOptions(
layout = Layout.FITCOLUMNS,
columns = listOf(
ColumnDefinition(
"Name 2",
"name",
headerFilter = Editor.INPUT,
headerFilterPlaceholder = "Text 2"
)
)
)
)
}
}
When I run this example I expect the second table to have a filter field with a placeholder "Text 2". But, instead "Text 1" is displayed. Why is that?Gunslingor
08/21/2020, 1:31 PMRobert Jaros
08/24/2020, 5:17 PM./gradlew browserProductionWebpack
task?Robert Jaros
08/26/2020, 2:59 PMbutton("save file").onClick {
val fileSaver = require("file-saver")
val csv = Blob(arrayOf("Hello, world\nkvision,is,great,:)!"), BlobPropertyBag("text/plain;charset=utf-8"))
fileSaver.saveAs(csv, "test.csv")
}
ashmelev
08/26/2020, 3:10 PMRobert Jaros
09/15/2020, 10:06 AMTomas Kormanak
09/18/2020, 8:06 AMTabPanel
and we often need to work with tabs programmaticaly but TabPanel does not expose much information/methods. We are missing couple of useful methods, like
getSize()
- hom many tabs exists
getComponentIndex(component:Component)
- to get index of a component
activate(component:Component)
- to activate component
Or am I missing something and there is a way how to achieve it?Robert Jaros
09/18/2020, 8:38 AMTabPanel
directly for the next releaseTomas Kormanak
09/18/2020, 9:06 AM