Cannot reduce the height of kendo grid in asp.net mvc - kendo-asp.net-mvc

I'm using 2 Kendo Grids to show some data. One Grid is above followed by 2nd grid
I want to reduce the height of grids
Given the code
.HtmlAttributes(new { style = "height: 350px;" })
It worked but the pagination part remains at the same position
Thanks

The grid has a function called "Height". Just use
.Height(350)

Related

Oracle APEX - How to hide tooltip for one series in a stacked bar chart

I am using Oracle APEX 19.1.0.00.15 and I have a question regarding tooltips for a stacked bar chart. I have created a stacked bar chart that consists of three series, but I would only like for the tooltip to be rendered for two of the series. I see that there is an option in the chart's Attributes section to hide or show the tooltip for the chart as a whole, but not for individual series within the chart. I have tried to find the relevant JavaScript for the tooltip in the Oracle JavaScript Extension Toolkit API Reference http://https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojChart.html but I was not able to find anything useful. Does anyone have any advice for how to achieve this?
Thank you.
You need to set shortDesc attribute for each item of the series to an empty string.
You can do that in initialization phase using the following code:
function( options ){
options.dataFilter = function( data ) {
var l_items = data.series[ 0 ].items
for (var i=0; i<l_items.length; i++) {
l_items[i].shortDesc = "";
}
return data;
};
return options;
}
The above code will disable tooltip for the items of the first series.

Chart JS horizontal bar chart width of bars and the chart

I have a horizontal bar chart that is too tall for the page (i.e. the user has to scroll down to see the full chart) and there is only 4 bars on the chart.
I can reduce the widths of the bars successfully, by using either barThickness or category and bar percentage. The problem is this does not reduce the overall height of the chart, as it just creates more space between each bar.
How do I reduce the width of the bar AND the overall chart, so the user does not have to scroll?
Thanks
Set the height of the chart canvas element, either by specifying it directly in the canvas tag or by specifying max-height in CSS.
Relevant links:
https://www.chartjs.org/docs/latest/#creating-a-chart
Setting width and height
I managed to fix it, using a suggestion from another post. In the following code snippet, I added the line that set the canvas height:-
$("#dvChart5").html("");
var canvas = document.createElement('canvas');
canvas.height = 100;
$("#dvChart5")[0].appendChild(canvas);

Chart.js custom legend inside of chart

fiddle of where I'm at so far
I'm using chart.js, and I'm trying to create a legend that is inside the chart, and not a separate piece of html. I see a lot of posts about legendCallback, but that seems like it only works if you want the legend to be in an html block, and not a part of your canvas that chart.js renders on.
I need this to be all on the canvas, underneath the "Title" that I've place on the chart myself. The dates are my chart labels, the "Title" is a dataset where only the middle piece of data is set to visible, and the dashed line is my fifth dataset.
I'm preventing the title and dashed line datasets from showing up in the legend with this
legend: {
labels: {
filter: function(item, chart) {
return !item.text.includes('hide');
}
}
}
Further, I'd like my legends to look more like their lines:
If it's not possible to make custom shapes like that, is there any way to fill the rectangles in the legends, without changing the fill of my data points?
Edit: Sorry for the wonky variable declaration at the top, it's because this script get's transformed into a scirban template.

Expression to set cell spacing with SQL Report Builder 3.0

I want an expression tho show the square box around every entry inside a column.
I am getting a normal table view right now. I just want to seperate each row borders.
.i.e. Cell spacing.
Please help me in using cell spacing with report builder 3.0
In addition to resolve this issue do the following steps:
Add one more row above & below to the Data Row & adjust the height for row as 0.2 in(Approximately - Can you add it more as your wishlist).
Then set the background Color using the expression where you want to display a square box as follows,
If you want to match any conditions,
=Switch(Condition = Value_1, "Red",Condition = Value_2, "#D2D2D2",True, "No Color")
otherwise specify color names or code, red, etc.

Dynamic resize gridview edit template based on size of Item template

I have a GridView that displays data in up to 30 columns. Sometimes this has the effect that the gridview expand to a width that requre a horizontal scrollbar but not always. The length of the data in the columns also vary and I don't want to set a specific width, it's nice that the grid is small if half of the columns are empty.
The problem is when I enter edit mode, labels gets replaced by textboxes and those take up more width and the whole table resizes itself.
Is there any way I can keep the item template and it's labels without a fixed size but at the same time always make sure the edit template will have the same size.
I was thinking about something like this:
On "enter edit mode event"
EditTemplateTextBox.Width = CurrentItemTemplate.Width;
I was able to keep my GridView from resizing when switched to edit mode (except for the new "Update" and "Cancel" columns that get added) using this CSS:
table input
{
width: 95%;
}
You can use 100% if you want, but 95% gave a little bit of spacing between the cells.
Also, if you have other tables on the page that you don't want to be affected by this, give your GridView a CssClass and replace 'table' with the name of your css class like so:
<asp:GridView ... CssClass="myGridView">
.myGridView input
{
width: 95%;
}