For the life of me I can't get the Google Chart Legend to NOT be shown, even though I'm specifying "NONE." (also noted here: Hiding the legend in Google Chart ).
$options = array( 'title' => 'Average Load Summary',
'titlePosition' => 'in',
'legend.position' => 'none',
'width' => 1100,
'height' => 700,
'hAxis.slantedTextAngle' => 90,
'hAxis.position' => 'out',
'pointSize' => 5,
'hAxis.title' => 'Stops');
Further, I can't get the slanted text angle to go horizontal (90 degrees), such that my entire label will be shown. Right now google adds "..." to my labels and they are at about a 45 degree angle. Finally, I also cannot get the hAxis.title or vAxis.title to be displayed, not matter what...
Thanks for any help anyone might have. This is a lineChart by the way...
Where you have this:
'legend.position' => 'none',
Try doing this:
'legend' => array('position' => 'none'),
For the other:
'hAxis' => array('title' => 'Stops', 'position' => 'out', 'slantedTextAngle' => 90),
Basically legend and hAxis accept multiple parameters, so they would each have their own array of options. There is only one parameter for something like width and height.
In javascript it would look like this:
var options = {
title: 'Average Load Summary'
,legend: {position: 'none'}
};
Related
My goal is to create a basic CloudFront distribution using the Paws sdk, and as of yet I have been unable to get past an error 400 with the following configuration:
use Paws;
use Data::Printer;
my $cloudfront = Paws->service('CloudFront');
my $CreateDistributionResult = $cloudfront->CreateDistribution(
DistributionConfig => {
CallerReference => "1578211502",
Origins => {
Quantity => 1,
Items => [{
DomainName => "foo.s3-website-ap-southeast-2.amazonaws.com",
Id => 'S3-Website-foo.s3-website-ap-southeast-2.amazonaws.com'}]
},
DefaultCacheBehavior => {
ForwardedValues => {
Cookies => {Forward => 'none'},
QueryString => 0
},
TargetOriginId => 'S3-Website-foo.s3-website-ap-southeast-2.amazonaws.com',
TrustedSigners => {
Enabled => 0,
Quantity => 0
},
ViewerProtocolPolicy => 'redirect-to-https',
MinTTL => 0
},
Comment => "",
Enabled => 1
});
p $CreateDistributionResult;
The above is the complete set of only the required fields as defined in the api documentation here and here. However, when I run the above it crashes with the following:
[foo#bar~]# perl aws.pl
Paws::CloudFront is not stable / supported / entirely developed at /root/perl5/lib/perl5/Paws/CloudFront.pm line 2.
Bad Request
Trace begun at /root/perl5/lib/perl5/Paws/Net/RestXMLResponse.pm line 24
Paws::Net::RestXMLResponse::process('Paws::Net::RestXMLResponse=HASH(0x2f275b8)', 'Paws::CloudFront::CreateDistribution=HASH(0x2fbe6e0)', 'Paws::Net::APIResponse=HASH(0x30c0ec0)') called at /root/perl5/lib/perl5/Paws/Net/Caller.pm line 46
Paws::Net::Caller::caller_to_response('Paws::Net::Caller=HASH(0x16d7bb8)', 'Paws::CloudFront=HASH(0x2a615f8)', 'Paws::CloudFront::CreateDistribution=HASH(0x2fbe6e0)', 'Paws::Net::APIResponse=HASH(0x30c0ec0)') called at /root/perl5/lib/perl5/Paws/Net/RetryCallerRole.pm line 19
Paws::Net::RetryCallerRole::do_call('Paws::Net::Caller=HASH(0x16d7bb8)', 'Paws::CloudFront=HASH(0x2a615f8)', 'Paws::CloudFront::CreateDistribution=HASH(0x2fbe6e0)') called at /root/perl5/lib/perl5/Paws/CloudFront.pm line 49
Paws::CloudFront::CreateDistribution('Paws::CloudFront=HASH(0x2a615f8)', 'DistributionConfig', 'HASH(0x2f9c500)') called at aws.pl line 6
What is a correct minimal call that would work here?
you don't have anything in the comment argument. Please try passing value there.
AWS is a bit stingy with these kinds of things. Also please let me know if that fixes the issue or not.
I am trying to implement filtering on child grid in kendo-ui hierarchical grid in MVC but it's giving error.
HTML Code Sample :
.Columns(col =>
{
col.Bound(o => o.Id).Hidden(true);
col.Bound(o => o.Column1).Width(100).ClientTemplate("\\#= BuildLink(data,'1') \\#");
col.Bound(o => o.Column2).Width(100).ClientTemplate("\\#= BuildLink(data,'2') \\#");
col.Bound(o => o.Column3).Width(100).ClientTemplate("\\#= BuildLink(data,'3') \\#");
col.Bound(o => o.YTDSailedCalls).Width(100).ClientTemplate("\\#= BuildLink(data,'4') \\#");
})
.Sortable().Scrollable().Filterable()
.Pageable(pageable => pageable.Refresh(true)
.PageSizes(new int[5] { 20, 40, 80, 100, 200 })
.ButtonCount(5))
but its giving error in browser console and nothing get displayed.
Please reply as soon as possible if anyone face this issue or have solution for this.
Try like this-
#(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(false))).Width(225);
columns.Bound(p => p.ShipName).Width(500).Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
columns.Bound(p => p.Freight).Width(255).Filterable(ftb => ftb.Cell(cell => cell.Operator("gte")));
columns.Bound(p => p.OrderDate).Format("{0:MM/dd/yyyy}");
})
.Pageable()
.Sortable()
.Scrollable()
.Filterable(ftb => ftb.Mode(GridFilterMode.Row))
.HtmlAttributes(new { style = "height:550px;" })
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.ServerOperation(true)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
For more assistance refer this link-
Kendo Grid filter
Below is my controller code for create new marker
#vnote_hash = Gmaps4rails.build_markers(#vnotes) do |vnote, marker|
marker.lat vnote["latitude"]
marker.lng vnote["longitude"]
marker.json({:trip_vnote_id => vnote["id"] })
marker.picture({
"url" => "images",
"width" => SHOW_SMALL_THUMB_IMAGE_WIDTH,
"height" => SHOW_SMALL_THUMB_IMAGE_HEIGHT})
end
in short, i want to do like differentiate click marker and un-click marker.
Migrate gmaps4rails v1 to v2 (great gem!). But i cannot get the custom marker images only the default one.
output code:
handler.buildMap({ provider: {}, internal: {id: 'map'}}, function(){
markers = handler.addMarkers([{"lat":43.3851,"lng":12.3856,"picture":{"picture":"/assets/house.png","width":"32","height":"32"},"title":"blablabla"}
controller
#locations = Location.where(:region => #region.id)
#hash = Gmaps4rails.build_markers(#locations) do |location, marker|
marker.lat location.latitude
marker.lng location.longitude
marker.infowindow location.description
marker.picture({
"picture" => "/assets/house.png",
"width" => "32",
"height" => "32"
})
marker.json({:title => location.description})
end
If you look ate the output the code works...but i don't see the custom marker house.png.
Am i doing something wrong here? Security issue?
Thanks..remco
You're simply not following the doc/examples, use:
marker.picture({
"url" => "/assets/house.png",
"width" => "32",
"height" => "32"
})
I am able to use Foreign Key column in a Kendo Grid. Using inline editing method, the "edit" action is working fine.
However, when adding a new record, every thing is fine on display. The foreign key column allows me to select value. But clicking the update button, the foreign key column value is null and subsequently unable to update database in my case.
Any advise how to resolve this.
I had same problem, Kendo UI isn't resolved problem yet (15/08/2014).
I resolved adding a client event on grid:
#(Html.Kendo().Grid<SPDProject.Models.DTO.ProyectoDTO>()
.Name("GridProyectos")
.Columns(columns =>
{
columns.Bound(r => r.Id).Visible(false);
columns.Bound(r => r.Nombre).Width(150);
columns.Bound(r => r.Alias).Width(150);
columns.ForeignKey(r => r.IdCliente, (System.Collections.IEnumerable)ViewData["IdCliente_Data"], "Value", "Text");
columns.ForeignKey(r => r.IdTipoProyecto, (System.Collections.IEnumerable)ViewData["IdTipoProyecto_Data"], "Value", "Text");
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(172);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Events(events => events.Error("error_handler"))
.Create(create => create.Action("CreateProyecto", "Admin"))
.Destroy(destroy => destroy.Action("DestroyProyecto", "Admin"))
.Model(model => model.Id(r => r.Id))
.Read(read => read.Action("ReadProyecto", "Admin"))
.Update(update => update.Action("UpdateProyecto", "Admin")))
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable(pageable => pageable.Refresh(true))
.Reorderable(reorderable => reorderable.Columns(true))
.Events(events => events.Save("onSave"))
.Resizable(resizable => resizable.Columns(true))
.Scrollable(scrollable => scrollable.Height(250))
.Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple).Type(GridSelectionType.Row))
.Sortable(sortable => sortable.AllowUnsort(true).SortMode(GridSortMode.MultipleColumn))
.ToolBar(toolBar => toolBar.Create()))
<script type="text/javascript">
function onSave(e) {
//set the value to the model
e.model.set('IdCliente', $('#IdCliente').val());
e.model.set('IdTipoProyecto', $('#IdTipoProyecto').val());
}
I hope this helps somebody.
Regards,
Mauro at DreamSys