Drill down column chart with highcharts4gwt - gwt

I want to drill down column chart but using highcharts4Gwt . I am doing
Array<Data> data1 = series1.dataAsArrayObject();
Data dat = highchartsFactory.createSeriesColumnData();
dat.y(15);
dat = dat.selected(false);
Data drillDownSeries = dat.drilldown("drill");
drillDownSeries.y(5);
drillDownSeries = drillDownSeries.selected(false);
data1.setValue(0, dat);
options.series().addToEnd(series1);
but column gets clicked bydefault. I don't want using json , but by the above way with 2 level. Is there any way to do this?
Thanks,

Related

Bulk copy filtered rows from one google sheet to another google sheet

I have a spreadsheet where I am able to filter the sheet based on a value on a column. I can copy the filtered data using isRowHiddenByFilter. But this does it one row at a time. I am looking for some input on how I can copy say 200 rows that I obtain after using a filter to be copied to another spreadsheet all at once and not evaluating 200 rows.
This is what I have working:
var criteria = SpreadsheetApp.newFilterCriteria().whenTextContains("I do NOT
plan").build();
ss.getActiveSheet().getFilter().setColumnFilterCriteria(4,criteria);
var nrsheet = ss.getSheetByName("Not Returning");
for (var i = 2; i < sheet.getLastRow(); i++)
{
if(!sheet.isRowHiddenByFilter(i))
{
row_data = sheet.getRange(i, 1, 1, sheet.getLastColumn()).getValues();
one_arr_nr = row_data.join().split(",");
nrsheet.appendRow(one_arr_nr);
}
}
This is what I would like to do:
Remove the for loop to evaluate each row and be able to copy what I see on the spreadsheet to be copied to the Not Returning sheet. Any help on how I can proceed?

Find and replace in matlab?

I want do find and replace all in matlab (As we do in MS office).
https://www.dropbox.com/s/hxfqunjwhnvkl1f/matlab.mat?dl=0
I have a cell array LUT_HS_complete (contains identifier in column 1 and protein name in column 2 and summary in column 3) this is my look up table. on the other hand, I have my protein-protein interaction data (named Second_layer with identifiers in first two columns and the score in column 3).
I want to replace the first two columns in my Second_layer with the corresponding protein name from my look up table.
I tried strmatch, but that didn't help me.
Source_gene = Second_layer(:,1); Source_gene = regexprep(Source_gene,'[-/\s]','');
Target_gene = Second_layer(:,2); Target_gene = regexprep(Target_gene,'[-/\s]','');
Inter_score = Second_layer(:,3);
%%
for i=1:length(Source_gene(1:end,1));
SG = strmatch(Source_gene(i),LUT_HS_complete(1:end,1),'exact');
renamed_Source_gene(SG,1) = LUT_HS_complete(SG,2);
end
for j=1:length(Target_gene(1:end,1));
TG = strmatch(Target_gene(j),LUT_HS_complete(1:end,1),'exact');
renamed_Target_gene(TG,1) = LUT_HS_complete(TG,2);
end
If you could find a solution. It would be a great help.
Might this work for you?
renamed_Second_layer(:,1)=LUT_HS_complete(cellfun(#(x) find(strcmp(x,LUT_HS_complete(:,1))),Second_layer(:,1)),2);
renamed_Second_layer(:,2)=LUT_HS_complete(cellfun(#(x) find(strcmp(x,LUT_HS_complete(:,1))),Second_layer(:,2)),2);
renamed_Second_layer(:,3)=Second_layer(:,3);

Formatting Problems in Displaying MATLAB Tables

I am doing a project for which I need to display data values in the form of a table. But when I try to view the table, the output is as shown in the screenshot that I have uploaded. But I need the data values to be seen. My code for creating the table is as follows:
Results_table = table(pi_c,Wnet,back_work,SFC,Cycle_efficiency,Exergetic_Cycle_Efficiency,'Varia bleNames',{'PressureRatio','NetWorkOutput','BackWorkRatio','SpecificFuelConsumption','CycleEfficiency','SecondLawEfficiency'});
Is there something wrong with my display settings or what I dunno. Also, if I need to format my data values, please let me know.!
It looks like you simply need to provide column vectors to the table instead of row vectors (i.e. 4x1 vectors instead of 1x4) for them to be displayed.
Example with sample data:
clear
clc
pi_c = 100*rand(4,1);
Wnet = 100*rand(4,1);
back_work = 100*rand(4,1);
SFC = 100*rand(4,1);
Cycle_efficiency = 100*rand(4,1);
Exergetic_Cycle_Efficiency = 100*rand(4,1);
Results_table = table(pi_c,Wnet,back_work,SFC,Cycle_efficiency,Exergetic_Cycle_Efficiency,'VariableNames',{'PressureRatio','NetWorkOutput','BackWorkRatio','SpecificFuelConsumption','CycleEfficiency','SecondLawEfficiency'})
Which works fine:
Results_table =
PressureRatio NetWorkOutput BackWorkRatio SpecificFuelConsumption CycleEfficiency
_____________ _____________ _____________ _______________________ _______________
10.665 81.73 25.987 18.185 86.929
96.19 86.869 80.007 26.38 57.97
0.46342 8.4436 43.141 14.554 54.986
77.491 39.978 91.065 13.607 14.495
SecondLawEfficiency
___________________
85.303
62.206
35.095
51.325
whereas using row vectors gives the same result as you.

my report is empty

I'm using vb net 2005. I have created a .xsd dataset with one table and a rpt report.
the dataset is PedidosDataImpresion.xsd with the table DatosPedido.
The rpt form is pedidoimpreso.rpt
this is my code:
Dim DatosImpresion As New PedidosDataImpresion
Dim TablaPrincipal As DataTable = DatosImpresion.DatosPedido
I = 0
TablaPrincipal.Rows.Add(1)
TablaPrincipal.Rows(I).Item("razonsocial") = Me.lblfacturacion.Text
TablaPrincipal.Rows(I).Item("calle") = Me.LblDireccion.Text
TablaPrincipal.Rows(I).Item("colonia") = Me.LblColonia.Text
TablaPrincipal.Rows(I).Item("ciudad") = Me.LblCiudad.Text
TablaPrincipal.Rows(I).Item("estado") = Me.LblEdo.Text
TablaPrincipal.Rows(I).Item("cp") = Me.LblEdo.Text
TablaPrincipal.Rows(I).Item("rfc") = Me.LblRfc.Text
PedidoImpreso.SetDataSource(DatosImpresion)
PedidoImpreso.PrintOptions.PrinterName = Impresora
PedidoImpreso.PrintToPrinter(Copias, True, 1, 1)
i wish to print directly to the printer with no reportviewer first
and the report comes with no data. Can you help me ?
You had to use some third party tool to do it.
What you can do is:
Make a HTML table
Fill Data
Print table on page load (using jQuery)
In case you want report format then you will need report viewer to get itself rendered.

set Datagirdviewcombobox column value in Vb.net

I have datagrid with two datagridviewcombo column, one column is dynamic fill and one has fixed hardcoded values.
The problem is I can't set the value of dynamic GridViewComboBox, when I try to set it generates continues errors.
System.FormateException: DataGridViewComboBoxCell Value is not valid.
My code to load the grid is
Dim dt As DataTable
dt = GetDataTable("Select valuecol,displayCol From mytable") 'GetDataTable gives me datatable
cmbAntibiotics.DataSource = dt
cmbAntibiotics.DisplayMember = "Antibiotics"
cmbAntibiotics.ValueMember = "AntibioticsID"
Dim Index As Integer
Dim dgr As DataGridViewRow
For Each dr As DataRow In dtFromDB.Rows 'This datatable is filled with database
Index = dtFromDB.Rows.Count - 1
GRDAntimicrobials.Rows.Add()
GRDAntimicrobials.Rows(Index).Cells("cmbAntibiotics").Value = dr("AntibioticsID").ToString 'At this point it shows value (1,2,3) rather then showing its display members
GRDAntimicrobials.Rows(Index).Cells("AntibioticsStatus").Value = dr("AntibioticsStatus").ToString
Next
Pls help with me
It seems like you're trying to assign the value to whatever there is on the cell rather than instantiate the object that resides in the cell and then assign its value. I would try something like this:
Dim vComboBoxColumn As DropDownList = DirectCast(GRDAntimicrobials.Rows(index).Cells("cmbAntibiotics"))
vComboBoxColumn.Value = dr("AntibioticsStatus").ToString