I think so to the first answer (using Webmatrix).
If by "model set" you mean if i can connect to a databse in my server, yes. Yes i can get data out of sql and show in web page.
Tnx, m
@{ Layout = null; var db = Database.Open("HEK"); var data = db.Query("SELECT * FROM VWS where ID > 2200");
var myChart = new Chart(width: 900, height: 350) .AddTitle("Absolutna kota vode v tesnilni zavesi") .AddSeries("nivo Sava", chartType: "Line", xValue: data, xField: "Datum", yValues: data, yFields: "Sava") .AddSeries("RPWS1", chartType: "Line", xValue: data, xField: "Datum", yValues: data, yFields: "RPWS1") .AddSeries("RPWS2", chartType: "Line", xValue: data, xField: "Datum", yValues: data, yFields: "RPWS2") .AddSeries("RPWS3", chartType: "Line", xValue: data, xField: "Datum", yValues: data, yFields: "RPWS3") .SetYAxis("absolutna kota", 159, 165.5) .AddLegend() .Write(); }
But this chart is not SVg, it's put in as an image...i'd like to put it in as SVG...
I'm not sure that's all you need, so please let me know if you need something more.
regards, m--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
<?xml version="1.0"?> <configuration>
<system.web>
<compilation targetFramework="4.5" debug="true"/> <globalization culture="sl-SI" enableClientBasedCulture="true" uiCulture="sl-SI"/> <customErrors mode="Off"/> <authentication mode="Windows"/> <identity impersonate="false"/> <pages controlRenderingCompatibilityVersion="4.0"/> </system.web> <connectionStrings> <add connectionString="Server=xxx.xxx.xxx.xxx,1433\SQLEXPRESS;Database=;Uid=-;Pwd=" name="mpavlic_Gecko" providerName="System.Data.SqlClient"/> <add connectionString="Server=xxx.xxx.xxx.xxx,1433\SQLEXPRESS;Database=;Uid=;Pwd=" name="HEK" providerName="System.Data.SqlClient"/>
</connectionStrings> <system.webServer> <defaultDocument enabled="true"> <files> <add value="index.cshtml"/> </files> </defaultDocument> <directoryBrowse enabled="false" showFlags="Date, Time, Size, Extension, LongDate"/> </system.webServer> </configuration>
@using System.Data;
@using System.Collections.Generic;
@using System.Data.SqlClient;@using System.Data;
@using System.Collections.Generic;
@using System.Data.SqlClient;
@{
Layout = null;
string connectionString="Server=xxx.xxx.xxx.xxx; Database=HEK; Uid=sa; Pwd=xxxxx";
DataTable dt = new DataTable();
using (SqlConnection conn = new SqlConnection(connectionString))
{
conn.Open();
using (SqlDataAdapter adapter = new SqlDataAdapter("SELECT Sava, rpws1 FROM VWS WHERE ID > 2200", conn))
{
adapter.Fill(dt);
};
};
--
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
No, I saw the, i tried it before also...it doesn't work. Same error...
The name 'rows' does not exist in the current context
2013/2/22 asgallant <drew_g...@abtassoc.com>
I made an error in my code above, it should be:var data = google.visualization.arrayToDataTable([@rows]);
--
On Friday, February 22, 2013 12:30:36 PM UTC-5, Matevz Uros Pavlic wrote:Hi,c# part seems to work ok....but i get an error in HTML and Javascript, still sayin rowsList :"The name 'rowsList' does not exist in the current context."If i check to see what rows c#, using Response.Write(rows); i get the string in a form of :['Datum', 'Sava', 'RPWS1'], [29.8.2012 18:00:00, 161.87, 161.79], [29.8.2012 20:00:00, 161.86, 161.77], [........Which is correct,...But using @rowsList or @rows produces the above error.Could there be a problem passing variable rows or rowsList to Java and HTML?
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
Hi,here are they. Thanks for helping,
Can you post the cshtml file and an example of the javascript rendered by the server (open the page in a browser and view the source)?
On Friday, February 22, 2013 1:33:14 PM UTC-5, Matevz Uros Pavlic wrote:
No, I saw the, i tried it before also...it doesn't work. Same error...
The name 'rows' does not exist in the current context
2013/2/22 asgallant <drew_g...@abtassoc.com>
I made an error in my code above, it should be:var data = google.visualization.arrayToDataTable([@rows]);
--
On Friday, February 22, 2013 12:30:36 PM UTC-5, Matevz Uros Pavlic wrote:Hi,c# part seems to work ok....but i get an error in HTML and Javascript, still sayin rowsList :"The name 'rowsList' does not exist in the current context."If i check to see what rows c#, using Response.Write(rows); i get the string in a form of :['Datum', 'Sava', 'RPWS1'], [29.8.2012 18:00:00, 161.87, 161.79], [29.8.2012 20:00:00, 161.86, 161.77], [........Which is correct,...But using @rowsList or @rows produces the above error.Could there be a problem passing variable rows or rowsList to Java and HTML?
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
var data = google.visualization.arrayToDataTable([['Datum', 'Sava', 'RPWS1'], |
| [29.8.2012 18:00:00, 161.87, 161.79], | |
| [29.8.2012 20:00:00, 161.86, 161.77], |
| [29.8.2012 22:00:00, 161.89, 161.79], | |
| [30.8.2012 0:00:00, 161.95, 161.84], | |
| [30.8.2012 2:00:00, 161.94, 161.85], |
2013/2/22 asgallant <drew_g...@abtassoc.com>
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
data1.addColumn('datetime', 'Datum');
data1.addColumn('number', 'Savum');
data1.addColumm('number', 'RPWS1');
data1.addRows([[new Date(2012, 7, 29, 18, 0, 0), 161.87, 161.79], [new Date(2012, 7, 29, 20, 0, 0), 161.86, 161.77], [new Date(2012, 7, 29, 22, 0, 0), 161.89, 161.79], [new Date(2012, 7, 30, 0, 0, 0), 161.95, 161.84], [new Date(2012, 7, 30, 2, 0, 0), 161.94, 161.85], [new Date(2012, 7, 30, 4, 0, 0), 161.9, 161.82], [new Date(2012, 7, 30, 6, 0, 0), 161.87, 161.79], [new Date(2012, 7, 30, 8, 0, 0), 161.87, 161.78], [new Date(2012, 7, 30, 10, 0, 0), 161.85, 161.78], [new Date(2012, 7, 30, 12, 0, 0), 161.86, 161.79], [new Date(2012, 7, 30, 14, 0, 0), 161.84, 161.77], [new Date(2012, 7, 30, 16, 0, 0), 161.84, 161.76], [new Date(2012, 7, 30, 18, 0, 0), 161.81, 161.74], [new Date(2012, 7, 30, 20, 0, 0), 161.77, 161.71], [new Date(2012, 7, 30, 22, 0, 0), 161.79, 161.71], [new Date(2012, 7, 31, 0, 0, 0), 161.85, 161.74], [new Date(2012, 7, 31, 2, 0, 0), 161.91, 161.81], [new Date(2012, 7, 31, 4, 0, 0), 161.87, 161.79],....
It's probably wrong...
thanks, m
| But it still doesn't show the chart... |
| ['Datum', 'Sava', 'RPWS1'], |
data1.addColumm('number', 'RPWS1');data1.addColumn('number', 'RPWS1');| <script type='text/javascript' src="http://www.google.com/jsapi"></script> | |
| <script type="text/javascript"> | |
| function drawChart() { | |
| var data1 = google.visualization.DataTable() |
| data1.addColumn('datetime', 'Datum'); |
| data1.addColumn('number', 'Sava'); |
| data1.addColumn('number', 'RPWS1'); |
But the chart don't show up. It's strange that even with the typo, column RPWS1 was still added in DataTable. I don't know what to do anymore... |
Sure thing...here it is (attached).Thanks!
m2013/2/25 asgallant <drew_g...@abtassoc.com>
Post the rendered javascript again, I'll take a look.
On Monday, February 25, 2013 12:45:33 AM UTC-5, Matevz Uros Pavlic wrote:Hi,i don't why, but it still doesn't do anything. The server render is like this:
<script type='text/javascript' src="http://www.google.com/jsapi"></script> <script type="text/javascript"> function drawChart() { var data1 = google.visualization.DataTable() data1.addColumn('datetime', 'Datum'); data1.addColumn('number', 'Sava'); data1.addColumn('number', 'RPWS1');
But the chart don't show up. It's strange that even with the typo, column RPWS1 was still added in DataTable.
I don't know what to do anymore...
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.