Yes, your data should be continuous.  The easiest way to handle this would 
be to create some offset space to the left and right of your data by 
setting the hAxis.viewWindow.min and hAxis.viewWindow.max options to values 
below and above the min and max of your "x" values (respectively):

var offset; // some value to offset the min/max by
var range = table.getColumnRange(0);

in options:

hAxis: {
    title: "Distance between Tx Site and Rx site (" + hLabel + ")",
    titleTextStyle: { color: "#333" },
    viewWindow: {
        min: range.min - offset,
        max: range.max + offset
    }
}

You will have to experiment with different values of the offset to get 
something that works for you.  

An alternative would be to create a new series of data with two points set 
slightly in from the min/max of the data set, and annotate these data 
points.  This is likely to be more work to accomplish, but will probably 
produce a more aesthetically pleasing chart.

On Thursday, October 9, 2014 11:40:09 AM UTC-4, John Hughes wrote:
>
> I believe the answer is continuous but I maybe incorrect.  Below is my 
> latest code, no data.  The data from a JSON request but maybe you can get 
> an idea of what I am doing.
>
> drawChart(id: number, name: string, isMetric: boolean = false): void {
>         "use strict";
>         /// Get data from server
>         $.getJSON("/Api/PtPSiteData/" + id, function (data: any): void {
>             /// distance string
>             var hLabel: string = (isMetric ? "km" : "miles");
>             var vLabel: string = (isMetric ? "meters" : "feet");
>             var txLabel: string = data.report.TXSiteName;
>             var rxLabel: string = data.report.RXSiteName;
>             /// Build the chart data table
>             /*
>              * report
>              * Reference
>              * Profile
>              * Curvature
>              * Fresnal
>              * Fresnal60
>              */
>             var table: google.visualization.DataTable = new 
> google.visualization.DataTable();
>             table.addColumn("number", "x", "x");
>             table.addColumn("number", "Point-to-Point Profile", "Profile");
>             table.addColumn("number", "Line of Sight Path", "Reference");
>             table.addColumn("number", "First Fresnel Zone", "Fresnal");
>             table.addColumn("number", "60% of First Fresnel Zone", 
> "Fresnal60");
>             table.addColumn({ type: "string", role: "annotation" });
>             for (var i: number = 0; i < data.Profile.length; i++) {
>                 var label: string = null;
>                 if (i === 0) {
>                     label = txLabel;
>                 } else if (i === data.Profile.length - 1) {
>                     label = rxLabel;
>                 }
>                 table.addRow([data.Profile[i].X,
>                     data.Profile[i].Y,
>                     data.Reference[i].Y,
>                     data.Fresnal[i].Y,
>                     data.Fresnal60[i].Y,
>                     label]);
>             }
>             /// Set chart options
>             var options: google.visualization.AreaChartOptions = {
>                 title: "Path profile between TX and RX sites",
>                 is3D: true,
>                 hAxis: {
>                     title: "Distance between Tx Site and Rx site (" + hLabel 
> + ")",
>                     titleTextStyle: { color: "#333" }
>                 },
>                 vAxis: {
>                     title: "Normalized Height Referenced to LOS Path (" + 
> vLabel + ")",
>                 },
>                 series: {
>                     0: { color: "#6E9A3F" },
>                     1: { color: "#DBAF00",<span class="styled-by-prettify" 
> styl
>
> ...

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to