Andrew,

Thanks for the suggestions.  The first one works but does not look very
good.  At about 0.50 the words start to get into the correct location but
then the lines are so far from the edge it starts looking bad.

I will see what I can do about implementing the second options.

On Thu, Oct 9, 2014 at 9:16 PM, Andrew Gallant <agall...@google.com> wrote:

> 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 a topic in the
> Google Groups "Google Visualization API" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-visualization-api/jrgEZBZZVtU/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-visualization-api+unsubscr...@googlegroups.com.
> To post to this group, send email to
> google-visualization-api@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/google-visualization-api.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Regards,
John J. Hughes II

-- 
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-visualization-api@googlegroups.com.
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