Closed nterl0k closed 6 years ago
Hello! Thanks for your interest in using Smashing. Unfortunately, the bandwidth available to support issues is greatly exceeded by the number of issues reported.
Due to this limitation, the maintainers of Smashing do not answer support requests submitted as GitHub issues. This is stated in the CONTRIBUTING.d, please read that for more details on how to get support.
Thanks!
Anyone with experience posting to dashing widgets via powershell would be appreciated. I'm able to update most of the other widgets, however the LineChart widget is being problematic. My sample code to update the widget is below... anyone that can assist would be helpful.
https://github.com/jorgemorgado/dashing-linechart
$server='http://127.0.0.1' $port='9292' $authToken = 'YOUR_AUTH_TOKEN' $widget = '/widgets/linechart' $uri = $server+':'+$port+$widget $labels = @('January','Februry','March','April','May','June','July')
$data=@() $data += [ordered]@{ label='Test Data' data= @(Get-Random -Minimum 10 -Maximum 80) $labels.length backgroundColor =@('rgba(255, 99, 132, 0.2)') $labels.length borderColor= @('rgba(255, 99, 132, 1)') $labels.length borderWidth= '1' } $data += @{ label='Test Data 2' data= @(Get-Random -Minimum 10 -Maximum 80) $labels.length backgroundColor =@('rgba(255, 99, 132, 0.2)') $labels.length borderColor= @('rgba(255, 99, 132, 1)') $labels.length borderWidth= 1 }
$options = @{ }
$Payload2 = @{ auth_token = $authToken moreinfo = 'Test' title = 'Line Chart' labels = $labels datasets = $data }
Invoke-RestMethod -UseBasicParsing $uri -Method Post -ContentType "application/json" -Body (convertto-json $payload2)