ভিজ্যুয়ালাইজেশন: কলাম চার্ট

ওভারভিউ

একটি কলাম চার্ট হল একটি উল্লম্ব বার চার্ট যা ব্রাউজারে SVG বা VML ব্যবহার করে রেন্ডার করা হয়, যেটি ব্যবহারকারীর ব্রাউজারের জন্য উপযুক্ত। সমস্ত Google চার্টের মতো, কলাম চার্টগুলি টুলটিপগুলি প্রদর্শন করে যখন ব্যবহারকারী ডেটার উপর ঘোরাফেরা করে। এই চার্টের একটি অনুভূমিক সংস্করণের জন্য, বার চার্টটি দেখুন।

উদাহরণ

রঙিন কলাম

চারটি মূল্যবান ধাতুর ঘনত্ব চার্ট করা যাক:

উপরে, সমস্ত রং ডিফল্ট নীল। কারণ তারা সবাই একই সিরিজের অংশ; যদি দ্বিতীয় সিরিজ থাকত, তাহলে সেটা লাল রঙের হতো। আমরা শৈলী ভূমিকা সঙ্গে এই রং কাস্টমাইজ করতে পারেন:

রং বেছে নেওয়ার তিনটি ভিন্ন উপায় আছে, এবং আমাদের ডেটা টেবিল সেগুলি সবগুলিকে দেখায়: RGB মান, ইংরেজি রঙের নাম এবং একটি CSS-এর মতো ঘোষণা:

       var data = google.visualization.arrayToDataTable([
         ['Element', 'Density', { role: 'style' }],
         ['Copper', 8.94, '#b87333'],            // RGB value
         ['Silver', 10.49, 'silver'],            // English color name
         ['Gold', 19.30, 'gold'],

       ['Platinum', 21.45, 'color: #e5e4e2' ], // CSS-style declaration
      ]);

কলাম শৈলী

শৈলীর ভূমিকা আপনাকে CSS-এর মতো ঘোষণার সাথে কলামের উপস্থিতির বিভিন্ন দিক নিয়ন্ত্রণ করতে দেয়:

  • color
  • opacity
  • fill-color
  • fill-opacity
  • stroke-color
  • stroke-opacity
  • stroke-width

আমরা সুপারিশ করি না যে আপনি একটি চার্টের মধ্যে খুব অবাধে শৈলীগুলি মিশ্রিত করুন—একটি শৈলী বেছে নিন এবং এটির সাথে লেগে থাকুন—কিন্তু সমস্ত শৈলী বৈশিষ্ট্যগুলি প্রদর্শন করতে, এখানে একটি নমুনা দেওয়া হল:

প্রথম দুটি কলাম প্রতিটি একটি নির্দিষ্ট color ব্যবহার করে (প্রথমটি একটি ইংরেজি নাম সহ, দ্বিতীয়টি একটি RGB মান সহ)। কোনো opacity বেছে নেওয়া হয়নি, তাই ডিফল্ট 1.0 (সম্পূর্ণ অস্বচ্ছ) ব্যবহার করা হয়; এই কারণেই দ্বিতীয় কলামটি এর পিছনের গ্রিডলাইনটিকে অস্পষ্ট করে। তৃতীয় কলামে, 0.2 এর একটি opacity ব্যবহার করা হয়, গ্রিডলাইনটি প্রকাশ করে। চতুর্থটিতে, তিনটি শৈলী বৈশিষ্ট্য ব্যবহার করা হয়েছে: সীমানা আঁকতে stroke-color এবং stroke-width , এবং ভিতরে আয়তক্ষেত্রের রঙ নির্দিষ্ট করতে fill-color । ডানদিকের কলামটি অতিরিক্তভাবে stroke-opacity এবং fill-opacity ব্যবহার করে সীমানা এবং পূরণের জন্য অস্বচ্ছতা বেছে নিতে:

   function drawChart() {
      var data = google.visualization.arrayToDataTable([
        ['Year', 'Visitations', { role: 'style' } ],
        ['2010', 10, 'color: gray'],
        ['2020', 14, 'color: #76A7FA'],
        ['2030', 16, 'opacity: 0.2'],
        ['2040', 22, 'stroke-color: #703593; stroke-width: 4; fill-color: #C5A5CF'],
        ['2050', 28, 'stroke-color: #871B47; stroke-opacity: 0.6; stroke-width: 8; fill-color: #BC5679; fill-opacity: 0.2']
      ]);

লেবেল কলাম

চার্টে বিভিন্ন ধরণের লেবেল রয়েছে, যেমন টিক লেবেল, কিংবদন্তি লেবেল এবং টুলটিপগুলিতে লেবেল। এই বিভাগে, আমরা দেখব কিভাবে একটি কলাম চার্টে কলামের ভিতরে (বা কাছাকাছি) লেবেল লাগাতে হয়।

ধরা যাক আমরা উপযুক্ত রাসায়নিক প্রতীক সহ প্রতিটি কলাম টীকা করতে চেয়েছিলাম। আমরা টীকা ভূমিকা দিয়ে এটি করতে পারি:

আমাদের ডাটা টেবিলে, আমরা আমাদের কলাম লেবেল ধরে রাখতে { role: 'annotation' } সহ একটি নতুন কলাম সংজ্ঞায়িত করি:

       var data = google.visualization.arrayToDataTable([
         ['Element', 'Density', { role: 'style' }, { role: 'annotation' } ],
         ['Copper', 8.94, '#b87333', 'Cu' ],
         ['Silver', 10.49, 'silver', 'Ag' ],
         ['Gold', 19.30, 'gold', 'Au' ],
         ['Platinum', 21.45, 'color: #e5e4e2', 'Pt' ]
      ]);

ব্যবহারকারীরা ডেটা মানগুলি দেখতে কলামগুলির উপর ঘোরাফেরা করতে পারে, আপনি তাদের নিজেরাই কলামগুলিতে অন্তর্ভুক্ত করতে চাইতে পারেন:

এটি হওয়া উচিত তার চেয়ে একটু বেশি জটিল, কারণ আমরা প্রতিটি কলামের জন্য টীকা নির্দিষ্ট করার জন্য একটি DataView তৈরি করি।

  <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
  <script type="text/javascript">
    google.charts.load("current", {packages:['corechart']});
    google.charts.setOnLoadCallback(drawChart);
    function drawChart() {
      var data = google.visualization.arrayToDataTable([
        ["Element", "Density", { role: "style" } ],
        ["Copper", 8.94, "#b87333"],
        ["Silver", 10.49, "silver"],
        ["Gold", 19.30, "gold"],
        ["Platinum", 21.45, "color: #e5e4e2"]
      ]);

      var view = new google.visualization.DataView(data);
      view.setColumns([0, 1,
                       { calc: "stringify",
                         sourceColumn: 1,
                         type: "string",
                         role: "annotation" },
                       2]);

      var options = {
        title: "Density of Precious Metals, in g/cm^3",
        width: 600,
        height: 400,
        bar: {groupWidth: "95%"},
        legend: { position: "none" },
      };
      var chart = new google.visualization.ColumnChart(document.getElementById("columnchart_values"));
      chart.draw(view, options);
  }
  </script>
<div id="columnchart_values" style="width: 900px; height: 300px;"></div>

যদি আমরা মানটিকে ভিন্নভাবে বিন্যাস করতে চাই, আমরা একটি ফরম্যাটারকে সংজ্ঞায়িত করতে পারি এবং এটিকে এভাবে একটি ফাংশনে মোড়ানো করতে পারি:

      function getValueAt(column, dataTable, row) {
        return dataTable.getFormattedValue(row, column);
      }

তারপরে আমরা এটিকে calc: getValueAt.bind(undefined, 1)

যদি লেবেলটি কলামের ভিতরে সম্পূর্ণরূপে ফিট করার জন্য খুব বড় হয় তবে এটি বাইরে প্রদর্শিত হয়:

স্তুপীকৃত কলাম চার্ট

একটি স্ট্যাকড কলাম চার্ট হল একটি কলাম চার্ট যা একে অপরের উপরে সম্পর্কিত মান রাখে। যদি কোনো নেতিবাচক মান থাকে, তাহলে সেগুলি চার্টের বেসলাইনের নিচে বিপরীত ক্রমে স্ট্যাক করা হয়। এটি সাধারণত ব্যবহৃত হয় যখন একটি বিভাগ স্বাভাবিকভাবে উপাদানগুলিতে বিভক্ত হয়। উদাহরণস্বরূপ, কিছু অনুমানমূলক বই বিক্রয় বিবেচনা করুন, যা জেনার দ্বারা বিভক্ত এবং সময়ের সাথে তুলনা করা হয়েছে:

আপনি isStacked বিকল্পটিকে true সেট করে একটি স্ট্যাক করা কলাম চার্ট তৈরি করেন:

      var data = google.visualization.arrayToDataTable([
        ['Genre', 'Fantasy & Sci Fi', 'Romance', 'Mystery/Crime', 'General',
         'Western', 'Literature', { role: 'annotation' } ],
        ['2010', 10, 24, 20, 32, 18, 5, ''],
        ['2020', 16, 22, 23, 30, 16, 9, ''],
        ['2030', 28, 19, 29, 30, 12, 13, '']
      ]);

      var options = {
        width: 600,
        height: 400,
        legend: { position: 'top', maxLines: 3 },
        bar: { groupWidth: '75%' },
        isStacked: true,
      };

স্ট্যাক করা কলাম চার্টগুলিও 100% স্ট্যাকিং সমর্থন করে, যেখানে প্রতিটি ডোমেন-মূল্যের উপাদানগুলির স্ট্যাকগুলিকে পুনরায় স্কেল করা হয় যাতে তারা 100% পর্যন্ত যোগ করে। এর জন্য বিকল্পগুলি হল isStacked: 'percent' , যা প্রতিটি মানকে 100% শতাংশ হিসাবে ফর্ম্যাট করে এবং isStacked: 'relative' , যা প্রতিটি মানকে 1 এর ভগ্নাংশ হিসাবে ফর্ম্যাট করে। এছাড়াও একটি isStacked: 'absolute' বিকল্প রয়েছে, যা কার্যকরীভাবে isStacked: true

ডানদিকে 100% স্ট্যাক করা চার্টে নোট করুন, টিক মানগুলি 1 এর ভগ্নাংশ হিসাবে আপেক্ষিক 0-1 স্কেলের উপর ভিত্তি করে, কিন্তু অক্ষের মানগুলি শতাংশ হিসাবে প্রদর্শিত হয়। এর কারণ হল শতাংশ অক্ষ টিকগুলি আপেক্ষিক 0-1 স্কেলের মানগুলিতে "#.##%" ফর্ম্যাট প্রয়োগ করার ফলাফল। isStacked: 'percent' ব্যবহার করার সময়, আপেক্ষিক 0-1 স্কেল ব্যবহার করে যেকোন টিক/অক্ষ মান নির্দিষ্ট করতে ভুলবেন না।

স্তুপীকৃত
        var options_stacked = {
          isStacked: true,
          height: 300,
          legend: {position: 'top', maxLines: 3},
          vAxis: {minValue: 0}
        };
    
100% স্তুপীকৃত
        var options_fullStacked = {
          isStacked: 'percent',
          height: 300,
          legend: {position: 'top', maxLines: 3},
          vAxis: {
            minValue: 0,
            ticks: [0, .3, .6, .9, 1]
          }
        };
    

উপাদান কলাম চার্ট তৈরি

2014 সালে, Google তার বৈশিষ্ট্য এবং অ্যাপ্লিকেশানগুলি (যেমন অ্যান্ড্রয়েড অ্যাপস) যেগুলি Google প্ল্যাটফর্মে চলে সেগুলি জুড়ে একটি সাধারণ চেহারা এবং অনুভূতি সমর্থন করার উদ্দেশ্যে নির্দেশিকা ঘোষণা করেছিল৷ এই প্রচেষ্টাকে আমরা মেটেরিয়াল ডিজাইন বলি। আমরা আমাদের সমস্ত মূল চার্টের "উপাদান" সংস্করণ প্রদান করব; আপনি যদি সেগুলি দেখতে পছন্দ করেন তবে আপনাকে সেগুলি ব্যবহার করতে স্বাগত জানাই৷

একটি উপাদান কলাম চার্ট তৈরি করা একটি তৈরি করার অনুরূপ যা আমরা এখন একটি "ক্লাসিক" কলাম চার্ট বলব। আপনি Google ভিজ্যুয়ালাইজেশন এপিআই লোড করুন (যদিও 'corechart' প্যাকেজের পরিবর্তে 'bar' প্যাকেজ সহ), আপনার ডেটা টেবিল সংজ্ঞায়িত করুন এবং তারপরে একটি অবজেক্ট তৈরি করুন (কিন্তু google.visualization.ColumnChart এর পরিবর্তে ক্লাস google.charts.Bar )।

যেহেতু বার চার্ট এবং কলাম চার্ট মূলত অভিন্ন কিন্তু ওরিয়েন্টেশনের জন্য, বারগুলি উল্লম্ব (শাস্ত্রীয়ভাবে, একটি কলাম চার্ট) বা অনুভূমিক (একটি বার চার্ট) হোক না কেন, আমরা উভয়টিকেই মেটেরিয়াল বার চার্ট বলি। উপাদান, শুধুমাত্র পার্থক্য bars বিকল্প. 'horizontal' এ সেট করা হলে, অভিযোজন ঐতিহ্যগত ক্লাসিক বার চার্টের অনুরূপ হবে; অন্যথায়, বারগুলি উল্লম্ব হবে।

দ্রষ্টব্য: ইন্টারনেট এক্সপ্লোরারের পুরানো সংস্করণে উপাদান চার্ট কাজ করবে না। (IE8 এবং পূর্ববর্তী সংস্করণগুলি SVG সমর্থন করে না, যা উপাদান চার্টের প্রয়োজন।)

উপাদান কলাম চার্টে ক্লাসিক কলাম চার্টের তুলনায় অনেক ছোট উন্নতি রয়েছে, যার মধ্যে একটি উন্নত রঙ প্যালেট, গোলাকার কোণ, পরিষ্কার লেবেল বিন্যাস, সিরিজের মধ্যে ডিফল্ট ডিফল্ট ব্যবধান, নরম গ্রিডলাইন এবং শিরোনাম (এবং সাবটাইটেল সংযোজন) অন্তর্ভুক্ত।

<html>
  <head>
    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
    <script type="text/javascript">
      google.charts.load('current', {'packages':['bar']});
      google.charts.setOnLoadCallback(drawChart);

      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          ['Year', 'Sales', 'Expenses', 'Profit'],
          ['2014', 1000, 400, 200],
          ['2015', 1170, 460, 250],
          ['2016', 660, 1120, 300],
          ['2017', 1030, 540, 350]
        ]);

        var options = {
          chart: {
            title: 'Company Performance',
            subtitle: 'Sales, Expenses, and Profit: 2014-2017',
          }
        };

        var chart = new google.charts.Bar(document.getElementById('columnchart_material'));

        chart.draw(data, google.charts.Bar.convertOptions(options));
      }
    </script>
  </head>
  <body>
    <div id="columnchart_material" style="width: 800px; height: 500px;"></div>
  </body>
</html>

উপাদান চার্ট বিটা মধ্যে আছে. চেহারা এবং ইন্টারঅ্যাক্টিভিটি মূলত চূড়ান্ত, তবে ক্লাসিক চার্টে উপলব্ধ অনেকগুলি বিকল্প এখনও সেগুলিতে উপলব্ধ নয়। আপনি বিকল্পগুলির একটি তালিকা খুঁজে পেতে পারেন যা এই সমস্যাটিতে এখনও সমর্থিত নয়।

এছাড়াও, বিকল্পগুলি যেভাবে ঘোষণা করা হয়েছে তা চূড়ান্ত করা হয়নি, তাই আপনি যদি কোনও ক্লাসিক বিকল্প ব্যবহার করেন তবে আপনাকে অবশ্যই এই লাইনটি প্রতিস্থাপন করে উপাদান বিকল্পগুলিতে রূপান্তর করতে হবে:

chart.draw(data, options);

...এর সাথে:

chart.draw(data, google.charts.Bar.convertOptions(options));

google.charts.Bar.convertOptions() ব্যবহার করা আপনাকে নির্দিষ্ট বৈশিষ্ট্যগুলির সুবিধা নিতে দেয়, যেমন hAxis/vAxis.format প্রিসেট বিকল্পগুলি।

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <div id="chart_div"></div> <br/> <div id="btn-group"> <button class="button button-blue" id="none">No Format</button> <button class="button button-blue" id="scientific">Scientific Notation</button> <button class="button button-blue" id="decimal">Decimal</button> <button class="button button-blue" id="short">Short</button> </div> google.charts.load('current', {'packages':['bar']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Year', 'Sales', 'Expenses', 'Profit'], ['2014', 1000, 400, 200], ['2015', 1170, 460, 250], ['2016', 660, 1120, 300], ['2017', 1030, 540, 350] ]); var options = { chart: { title: 'Company Performance', subtitle: 'Sales, Expenses, and Profit: 2014-2017', }, bars: 'vertical', vAxis: {format: 'decimal'}, height: 400, colors: ['#1b9e77', '#d95f02', '#7570b3'] }; var chart = new google.charts.Bar(document.getElementById('chart_div')); chart.draw(data, google.charts.Bar.convertOptions(options)); var btns = document.getElementById('btn-group'); btns.onclick = function (e) { if (e.target.tagName === 'BUTTON') { options.vAxis.format = e.target.id === 'none' ? '' : e.target.id; chart.draw(data, google.charts.Bar.convertOptions(options)); } } } <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <div id="chart_div"></div> <br/> <div id="btn-group"> <button class="button button-blue" id="none">No Format</button> <button class="button button-blue" id="scientific">Scientific Notation</button> <button class="button button-blue" id="decimal">Decimal</button> <button class="button button-blue" id="short">Short</button> </div> google.charts.load('current', {'packages':['bar']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Year', 'Sales', 'Expenses', 'Profit'], ['2014', 1000, 400, 200], ['2015', 1170, 460, 250], ['2016', 660, 1120, 300], ['2017', 1030, 540, 350] ]); var options = { chart: { title: 'Company Performance', subtitle: 'Sales, Expenses, and Profit: 2014-2017', }, bars: 'vertical', vAxis: {format: 'decimal'}, height: 400, colors: ['#1b9e77', '#d95f02', '#7570b3'] }; var chart = new google.charts.Bar(document.getElementById('chart_div')); chart.draw(data, google.charts.Bar.convertOptions(options)); var btns = document.getElementById('btn-group'); btns.onclick = function (e) { if (e.target.tagName === 'BUTTON') { options.vAxis.format = e.target.id === 'none' ? '' : e.target.id; chart.draw(data, google.charts.Bar.convertOptions(options)); } } }

ডুয়াল-ওয়াই চার্ট

কখনও কখনও আপনি দুটি স্বাধীন Y-অক্ষ সহ একটি কলাম চার্টে দুটি সিরিজ প্রদর্শন করতে চাইবেন: একটি সিরিজের জন্য একটি বাম অক্ষ এবং অন্যটির জন্য একটি ডান অক্ষ:

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <button id="change-chart">Change to Classic</button> <br><br> <div id="chart_div" style="width: 800px; height: 500px;"></div> google.charts.load('current', {'packages':['corechart', 'bar']}); google.charts.setOnLoadCallback(drawStuff); function drawStuff() { var button = document.getElementById('change-chart'); var chartDiv = document.getElementById('chart_div'); var data = google.visualization.arrayToDataTable([ ['Galaxy', 'Distance', 'Brightness'], ['Canis Major Dwarf', 8000, 23.3], ['Sagittarius Dwarf', 24000, 4.5], ['Ursa Major II Dwarf', 30000, 14.3], ['Lg. Magellanic Cloud', 50000, 0.9], ['Bootes I', 60000, 13.1] ]); var materialOptions = { width: 900, chart: { title: 'Nearby galaxies', subtitle: 'distance on the left, brightness on the right' }, series: { 0: { axis: 'distance' }, // Bind series 0 to an axis named 'distance'. 1: { axis: 'brightness' } // Bind series 1 to an axis named 'brightness'. }, axes: { y: { distance: {label: 'parsecs'}, // Left y-axis. brightness: {side: 'right', label: 'apparent magnitude'} // Right y-axis. } } }; var classicOptions = { width: 900, series: { 0: {targetAxisIndex: 0}, 1: {targetAxisIndex: 1} }, title: 'Nearby galaxies - distance on the left, brightness on the right', vAxes: { // Adds titles to each axis. 0: {title: 'parsecs'}, 1: {title: 'apparent magnitude'} } }; function drawMaterialChart() { var materialChart = new google.charts.Bar(chartDiv); materialChart.draw(data, google.charts.Bar.convertOptions(materialOptions)); button.innerText = 'Change to Classic'; button.onclick = drawClassicChart; } function drawClassicChart() { var classicChart = new google.visualization.ColumnChart(chartDiv); classicChart.draw(data, classicOptions); button.innerText = 'Change to Material'; button.onclick = drawMaterialChart; } drawMaterialChart(); }; <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <button id="change-chart">Change to Classic</button> <br><br> <div id="chart_div" style="width: 800px; height: 500px;"></div> google.charts.load('current', {'packages':['corechart', 'bar']}); google.charts.setOnLoadCallback(drawStuff); function drawStuff() { var button = document.getElementById('change-chart'); var chartDiv = document.getElementById('chart_div'); var data = google.visualization.arrayToDataTable([ ['Galaxy', 'Distance', 'Brightness'], ['Canis Major Dwarf', 8000, 23.3], ['Sagittarius Dwarf', 24000, 4.5], ['Ursa Major II Dwarf', 30000, 14.3], ['Lg. Magellanic Cloud', 50000, 0.9], ['Bootes I', 60000, 13.1] ]); var materialOptions = { width: 900, chart: { title: 'Nearby galaxies', subtitle: 'distance on the left, brightness on the right' }, series: { 0: { axis: 'distance' }, // Bind series 0 to an axis named 'distance'. 1: { axis: 'brightness' } // Bind series 1 to an axis named 'brightness'. }, axes: { y: { distance: {label: 'parsecs'}, // Left y-axis. brightness: {side: 'right', label: 'apparent magnitude'} // Right y-axis. } } }; var classicOptions = { width: 900, series: { 0: {targetAxisIndex: 0}, 1: {targetAxisIndex: 1} }, title: 'Nearby galaxies - distance on the left, brightness on the right', vAxes: { // Adds titles to each axis. 0: {title: 'parsecs'}, 1: {title: 'apparent magnitude'} } }; function drawMaterialChart() { var materialChart = new google.charts.Bar(chartDiv); materialChart.draw(data, google.charts.Bar.convertOptions(materialOptions)); button.innerText = 'Change to Classic'; button.onclick = drawClassicChart; } function drawClassicChart() { var classicChart = new google.visualization.ColumnChart(chartDiv); classicChart.draw(data, classicOptions); button.innerText = 'Change to Material'; button.onclick = drawMaterialChart; } drawMaterialChart(); };

মনে রাখবেন যে শুধুমাত্র আমাদের দুটি y-অক্ষকে আলাদাভাবে লেবেল করা হয় না ("পার্সেক" বনাম "আপাত মাত্রা") তবে তাদের প্রত্যেকের নিজস্ব স্বতন্ত্র স্কেল এবং গ্রিডলাইন রয়েছে। আপনি যদি এই আচরণটি কাস্টমাইজ করতে চান, vAxis.gridlines বিকল্পগুলি ব্যবহার করুন৷

নীচের কোডে, axes এবং series বিকল্পগুলি একসাথে চার্টের দ্বৈত-Y উপস্থিতি নির্দিষ্ট করে৷ series বিকল্পটি নির্দিষ্ট করে যে প্রতিটির জন্য কোন অক্ষ ব্যবহার করতে হবে ( 'distance' এবং 'brightness' ; ডেটা টেবিলের কলামের নামের সাথে তাদের কোন সম্পর্ক নেই)। axes বিকল্পটি তারপর এই চার্টটিকে একটি দ্বৈত-ওয়াই চার্ট করে, বাম দিকে 'distance' অক্ষ স্থাপন করে ("পার্সেক" লেবেলযুক্ত) এবং 'brightness' অক্ষটি ডানদিকে ("আপাত মাত্রা" লেবেলযুক্ত)।

<html>
  <head>
    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
    <script type="text/javascript">
      google.charts.load('current', {'packages':['corechart', 'bar']});
      google.charts.setOnLoadCallback(drawStuff);

      function drawStuff() {

        var button = document.getElementById('change-chart');
        var chartDiv = document.getElementById('chart_div');

        var data = google.visualization.arrayToDataTable([
          ['Galaxy', 'Distance', 'Brightness'],
          ['Canis Major Dwarf', 8000, 23.3],
          ['Sagittarius Dwarf', 24000, 4.5],
          ['Ursa Major II Dwarf', 30000, 14.3],
          ['Lg. Magellanic Cloud', 50000, 0.9],
          ['Bootes I', 60000, 13.1]
        ]);

        var materialOptions = {
          width: 900,
          chart: {
            title: 'Nearby galaxies',
            subtitle: 'distance on the left, brightness on the right'
          },
          series: {
            0: { axis: 'distance' }, // Bind series 0 to an axis named 'distance'.
            1: { axis: 'brightness' } // Bind series 1 to an axis named 'brightness'.
          },
          axes: {
            y: {
              distance: {label: 'parsecs'}, // Left y-axis.
              brightness: {side: 'right', label: 'apparent magnitude'} // Right y-axis.
            }
          }
        };

        var classicOptions = {
          width: 900,
          series: {
            0: {targetAxisIndex: 0},
            1: {targetAxisIndex: 1}
          },
          title: 'Nearby galaxies - distance on the left, brightness on the right',
          vAxes: {
            // Adds titles to each axis.
            0: {title: 'parsecs'},
            1: {title: 'apparent magnitude'}
          }
        };

        function drawMaterialChart() {
          var materialChart = new google.charts.Bar(chartDiv);
          materialChart.draw(data, google.charts.Bar.convertOptions(materialOptions));
          button.innerText = 'Change to Classic';
          button.onclick = drawClassicChart;
        }

        function drawClassicChart() {
          var classicChart = new google.visualization.ColumnChart(chartDiv);
          classicChart.draw(data, classicOptions);
          button.innerText = 'Change to Material';
          button.onclick = drawMaterialChart;
        }

        drawMaterialChart();
    };
    </script>
  </head>
  <body>
    <button id="change-chart">Change to Classic</button>
    <br><br>
    <div id="chart_div" style="width: 800px; height: 500px;"></div>
  </body>
</html>

শীর্ষ-এক্স চার্ট

দ্রষ্টব্য: Top-X অক্ষগুলি শুধুমাত্র উপাদান চার্টের জন্য উপলব্ধ (অর্থাৎ, প্যাকেজ bar সহ)।

আপনি যদি X-অক্ষ লেবেল এবং শিরোনাম আপনার চার্টের উপরে নীচে না দিয়ে রাখতে চান, তাহলে আপনি axes.x বিকল্পের সাথে উপাদান চার্টে তা করতে পারেন:

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <div id="top_x_div" style="width: 800px; height: 600px;"></div> google.charts.load('current', {'packages':['bar']}); google.charts.setOnLoadCallback(drawStuff); function drawStuff() { var data = new google.visualization.arrayToDataTable([ ['Move', 'Percentage'], ["King's pawn (e4)", 44], ["Queen's pawn (d4)", 31], ["Knight to King 3 (Nf3)", 12], ["Queen's bishop pawn (c4)", 10], ['Other', 3] ]); var options = { width: 800, legend: { position: 'none' }, chart: { title: 'Chess opening moves', subtitle: 'popularity by percentage' }, axes: { x: { 0: { side: 'top', label: 'White to move'} // Top x-axis. } }, bar: { groupWidth: "90%" } }; var chart = new google.charts.Bar(document.getElementById('top_x_div')); // Convert the Classic options to Material options. chart.draw(data, google.charts.Bar.convertOptions(options)); }; <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <div id="top_x_div" style="width: 800px; height: 600px;"></div> google.charts.load('current', {'packages':['bar']}); google.charts.setOnLoadCallback(drawStuff); function drawStuff() { var data = new google.visualization.arrayToDataTable([ ['Move', 'Percentage'], ["King's pawn (e4)", 44], ["Queen's pawn (d4)", 31], ["Knight to King 3 (Nf3)", 12], ["Queen's bishop pawn (c4)", 10], ['Other', 3] ]); var options = { width: 800, legend: { position: 'none' }, chart: { title: 'Chess opening moves', subtitle: 'popularity by percentage' }, axes: { x: { 0: { side: 'top', label: 'White to move'} // Top x-axis. } }, bar: { groupWidth: "90%" } }; var chart = new google.charts.Bar(document.getElementById('top_x_div')); // Convert the Classic options to Material options. chart.draw(data, google.charts.Bar.convertOptions(options)); };
<html>
  <head>
    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
    <script type="text/javascript">
      google.charts.load('current', {'packages':['bar']});
      google.charts.setOnLoadCallback(drawStuff);

      function drawStuff() {
        var data = new google.visualization.arrayToDataTable([
          ['Move', 'Percentage'],
          ["King's pawn (e4)", 44],
          ["Queen's pawn (d4)", 31],
          ["Knight to King 3 (Nf3)", 12],
          ["Queen's bishop pawn (c4)", 10],
          ['Other', 3]
        ]);

        var options = {
          width: 800,
          legend: { position: 'none' },
          chart: {
            title: 'Chess opening moves',
            subtitle: 'popularity by percentage' },
          axes: {
            x: {
              0: { side: 'top', label: 'White to move'} // Top x-axis.
            }
          },
          bar: { groupWidth: "90%" }
        };

        var chart = new google.charts.Bar(document.getElementById('top_x_div'));
        // Convert the Classic options to Material options.
        chart.draw(data, google.charts.Bar.convertOptions(options));
      };
    </script>
  </head>
  <body>
    <div id="top_x_div" style="width: 800px; height: 600px;"></div>
  </body>
</html>

লোড হচ্ছে

google.charts.load প্যাকেজের নাম "corechart" । ভিজ্যুয়ালাইজেশনের ক্লাসের নাম হল google.visualization.ColumnChart

  google.charts.load("current", {packages: ["corechart"]});
  var visualization = new google.visualization.ColumnChart(container);

উপাদান কলাম চার্টের জন্য, google.charts.load প্যাকেজের নাম হল "bar" । (একটি টাইপো নয়: উপাদান বার চার্ট উভয় অভিযোজন পরিচালনা করে।) ভিজ্যুয়ালাইজেশনের ক্লাসের নাম হল google.charts.Bar । (একটি টাইপো নয়: উপাদান বার চার্ট উভয় অভিযোজন পরিচালনা করে।)

  google.charts.load("current", {packages: ["bar"]});
  var chart = new google.charts.Bar(container);

উপাত্ত বিন্যাস

টেবিলের প্রতিটি সারি সংলগ্ন বারগুলির একটি গ্রুপকে প্রতিনিধিত্ব করে।

সারি: টেবিলের প্রতিটি সারি বারগুলির একটি গ্রুপকে প্রতিনিধিত্ব করে।

কলাম:

কলাম 0 কলাম 1 ... কলাম এন
উদ্দেশ্য: এই গ্রুপে বার 1 মান ... এই গ্রুপে বার এন মান
ডেটা টাইপ: সংখ্যা ... সংখ্যা
ভূমিকা: ডোমেইন তথ্য ... তথ্য
ঐচ্ছিক কলাম ভূমিকা : ...

কনফিগারেশন অপশন

নাম
animation.duration

অ্যানিমেশনের সময়কাল, মিলিসেকেন্ডে। বিস্তারিত জানার জন্য, অ্যানিমেশন ডকুমেন্টেশন দেখুন।

প্রকার: সংখ্যা
ডিফল্ট: 0
animation.easing

অ্যানিমেশনে প্রয়োগ করা ইজিং ফাংশন। নিম্নলিখিত বিকল্পগুলি উপলব্ধ:

  • 'রৈখিক' - স্থির গতি।
  • 'ইন' - ইজ ইন - ধীরে শুরু করুন এবং গতি বাড়ান।
  • 'আউট' - সহজ আউট - দ্রুত শুরু করুন এবং ধীরে ধীরে করুন।
  • 'inAndOut' - সহজে প্রবেশ এবং আউট - ধীর শুরু করুন, গতি বাড়ান, তারপর ধীর করুন।
প্রকার: স্ট্রিং
ডিফল্ট: 'লিনিয়ার'
animation.startup

প্রাথমিক ড্রতে চার্ট অ্যানিমেট হবে কিনা তা নির্ধারণ করে। true হলে, চার্ট বেসলাইনে শুরু হবে এবং চূড়ান্ত অবস্থায় অ্যানিমেট হবে।

প্রকার: বুলিয়ান
ডিফল্ট মিথ্যা
annotations.alwaysOutside

বার এবং কলাম চার্টে, যদি true সেট করা হয়, বার/কলামের বাইরে সমস্ত টীকা আঁকে।

প্রকার: বুলিয়ান
ডিফল্ট: মিথ্যা
annotations.boxStyle

টীকাগুলিকে সমর্থন করে এমন চার্টগুলির জন্য, annotations.boxStyle অবজেক্ট টিকাগুলির আশেপাশের বাক্সগুলির উপস্থিতি নিয়ন্ত্রণ করে:

var options = {
  annotations: {
    boxStyle: {
      // Color of the box outline.
      stroke: '#888',
      // Thickness of the box outline.
      strokeWidth: 1,
      // x-radius of the corner curvature.
      rx: 10,
      // y-radius of the corner curvature.
      ry: 10,
      // Attributes for linear gradient fill.
      gradient: {
        // Start color for gradient.
        color1: '#fbf6a7',
        // Finish color for gradient.
        color2: '#33b679',
        // Where on the boundary to start and
        // end the color1/color2 gradient,
        // relative to the upper left corner
        // of the boundary.
        x1: '0%', y1: '0%',
        x2: '100%', y2: '100%',
        // If true, the boundary for x1,
        // y1, x2, and y2 is the box. If
        // false, it's the entire chart.
        useObjectBoundingBoxUnits: true
      }
    }
  }
};
    

এই বিকল্পটি বর্তমানে এলাকা, বার, কলাম, কম্বো, লাইন এবং স্ক্যাটার চার্টের জন্য সমর্থিত। এটি টীকা চার্ট দ্বারা সমর্থিত নয়।

প্রকার: বস্তু
ডিফল্ট: নাল
annotations.datum
টীকা সমর্থন করে এমন চার্টগুলির জন্য, annotations.datum অবজেক্ট আপনাকে পৃথক ডেটা উপাদানগুলির জন্য দেওয়া টীকাগুলির জন্য Google চার্টের পছন্দকে ওভাররাইড করতে দেয় (যেমন একটি বার চার্টে প্রতিটি বারের সাথে প্রদর্শিত মান)। আপনি annotations.datum.style দিয়ে রঙ, annotations.datum.stem.color সহ স্টেমের দৈর্ঘ্য এবং annotations.datum.stem.length সহ শৈলী নিয়ন্ত্রণ করতে পারেন।
প্রকার: বস্তু
ডিফল্ট: রঙ হল "কালো"; দৈর্ঘ্য 12; শৈলী হল "বিন্দু"।
annotations.domain
টীকা সমর্থন করে এমন চার্টের জন্য, annotations.domain অবজেক্ট আপনাকে একটি ডোমেনের জন্য দেওয়া টীকাগুলির জন্য Google চার্টের পছন্দকে ওভাররাইড করতে দেয় (চার্টের প্রধান অক্ষ, যেমন একটি সাধারণ লাইন চার্টে X অক্ষ)। আপনি annotations.domain.style দিয়ে রঙ নিয়ন্ত্রণ করতে পারেন, annotations.domain.stem.color দিয়ে স্টেমের দৈর্ঘ্য এবং annotations.domain.stem.length দিয়ে শৈলী নিয়ন্ত্রণ করতে পারেন।
প্রকার: বস্তু
ডিফল্ট: রঙ হল "কালো"; দৈর্ঘ্য 5; শৈলী হল "বিন্দু"।
annotations.high Contrast
টীকা সমর্থন করে এমন চার্টের জন্য, annotations.highContrast বুলিয়ান আপনাকে টীকা রঙের Google চার্টের পছন্দকে ওভাররাইড করতে দেয়৷ ডিফল্টরূপে, annotations.highContrast সত্য, যার কারণে চার্টগুলি ভাল বৈসাদৃশ্য সহ একটি টীকা রঙ নির্বাচন করে: অন্ধকার ব্যাকগ্রাউন্ডে হালকা রং এবং আলোতে গাঢ়। আপনি যদি annotations.highContrast কে মিথ্যাতে সেট করেন এবং আপনার নিজস্ব টীকা রঙ নির্দিষ্ট না করেন, Google চার্ট টীকাটির জন্য ডিফল্ট সিরিজের রঙ ব্যবহার করবে:
প্রকার: বুলিয়ান
ডিফল্ট: সত্য
annotations.stem
টীকা সমর্থন করে এমন চার্টের জন্য, annotations.stem অবজেক্ট আপনাকে স্টেম শৈলীর জন্য Google চার্টের পছন্দকে ওভাররাইড করতে দেয়। আপনি annotations.stem.length দিয়ে রঙ এবং annotations.stem.color দিয়ে স্টেমের দৈর্ঘ্য নিয়ন্ত্রণ করতে পারেন। মনে রাখবেন যে স্টেম দৈর্ঘ্য বিকল্পটি 'line' শৈলী সহ টীকাগুলির উপর কোন প্রভাব ফেলে না : 'line' ডেটাম টীকাগুলির জন্য, স্টেমের দৈর্ঘ্য সর্বদা পাঠ্যের মতোই হয় এবং 'line' ডোমেন টীকাগুলির জন্য, স্টেমটি পুরো চার্ট জুড়ে প্রসারিত হয় .
প্রকার: বস্তু
ডিফল্ট: রঙ হল "কালো"; ডোমেন টীকাগুলির জন্য দৈর্ঘ্য 5 এবং ডেটাম টীকাগুলির জন্য 12৷
annotations.style
টীকা সমর্থন করে এমন চার্টের জন্য, annotations.style বিকল্পটি আপনাকে Google চার্টের টীকা প্রকারের পছন্দকে ওভাররাইড করতে দেয়৷ এটি হয় 'line' বা 'point' হতে পারে।
প্রকার: স্ট্রিং
ডিফল্ট: 'পয়েন্ট'
annotations.textStyle
টীকা সমর্থন করে এমন চার্টের জন্য, annotations.textStyle অবজেক্ট টিকাটির পাঠ্যের উপস্থিতি নিয়ন্ত্রণ করে:
var options = {
  annotations: {
    textStyle: {
      fontName: 'Times-Roman',
      fontSize: 18,
      bold: true,
      italic: true,
      // The color of the text.
      color: '#871b47',
      // The color of the text outline.
      auraColor: '#d799ae',
      // The transparency of the text.
      opacity: 0.8
    }
  }
};
    

এই বিকল্পটি বর্তমানে এলাকা, বার, কলাম, কম্বো, লাইন এবং স্ক্যাটার চার্টের জন্য সমর্থিত। এটি টীকা চার্ট দ্বারা সমর্থিত নয়।

প্রকার: বস্তু
ডিফল্ট: নাল
axisTitlesPosition

চার্ট এলাকার তুলনায় কোথায় অক্ষ শিরোনাম স্থাপন করতে হবে। সমর্থিত মান:

  • in - চার্ট এলাকার ভিতরে অক্ষ শিরোনাম আঁকুন।
  • আউট - চার্ট এলাকার বাইরে অক্ষ শিরোনাম আঁকুন।
  • কোনোটিই নয় - অক্ষ শিরোনাম বাদ দিন।
প্রকার: স্ট্রিং
ডিফল্ট: 'আউট'
পেছনের রং

চার্টের প্রধান এলাকার জন্য পটভূমির রঙ। একটি সাধারণ HTML রঙের স্ট্রিং হতে পারে, উদাহরণস্বরূপ: 'red' বা '#00cc00' , অথবা নিম্নলিখিত বৈশিষ্ট্য সহ একটি বস্তু।

প্রকার: স্ট্রিং বা বস্তু
ডিফল্ট: 'সাদা'
backgroundColor.stroke

চার্ট সীমানার রঙ, একটি HTML রঙের স্ট্রিং হিসাবে।

প্রকার: স্ট্রিং
ডিফল্ট: '#666'
backgroundColor.strokeWidth

সীমানার প্রস্থ, পিক্সেলে।

প্রকার: সংখ্যা
ডিফল্ট: 0
backgroundColor.fill

চার্ট ফিল কালার, একটি HTML কালার স্ট্রিং হিসেবে।

প্রকার: স্ট্রিং
ডিফল্ট: 'সাদা'
bar.groupwidth
এই ফর্ম্যাটে যেকোন একটিতে নির্দিষ্ট করা বারগুলির একটি গ্রুপের প্রস্থ:
  • পিক্সেল (যেমন 50)।
  • প্রতিটি গোষ্ঠীর জন্য উপলব্ধ প্রস্থের শতাংশ (যেমন '20%'), যেখানে '100%' মানে গ্রুপগুলির মধ্যে কোনও স্থান নেই৷
প্রকার: সংখ্যা বা স্ট্রিং
ডিফল্ট: গোল্ডেন রেশিও , প্রায় '61.8%'।
বার

মেটেরিয়াল বার চার্টের বারগুলি উল্লম্ব বা অনুভূমিক কিনা। এই বিকল্পটি ক্লাসিক বার চার্ট বা ক্লাসিক কলাম চার্টের উপর কোন প্রভাব ফেলবে না।

প্রকার: 'অনুভূমিক' বা 'উল্লম্ব'
ডিফল্ট: 'উল্লম্ব'
চার্ট এরিয়া

চার্ট এলাকার অবস্থান এবং আকার কনফিগার করার জন্য সদস্যদের সাথে একটি বস্তু (যেখানে অক্ষ এবং কিংবদন্তি বাদ দিয়ে চার্ট নিজেই আঁকা হয়)। দুটি বিন্যাস সমর্থিত: একটি সংখ্যা, বা একটি সংখ্যা অনুসরণ করে %৷ একটি সাধারণ সংখ্যা পিক্সেলের একটি মান; % দ্বারা অনুসরণ করা একটি সংখ্যা একটি শতাংশ। উদাহরণ: chartArea:{left:20,top:0,width:'50%',height:'75%'}

প্রকার: বস্তু
ডিফল্ট: নাল
chartArea.backgroundColor
চার্ট এলাকার পটভূমির রঙ। যখন একটি স্ট্রিং ব্যবহার করা হয়, এটি হয় একটি হেক্স স্ট্রিং (যেমন, '#fdc') বা একটি ইংরেজি রঙের নাম হতে পারে। যখন একটি বস্তু ব্যবহার করা হয়, নিম্নলিখিত বৈশিষ্ট্য প্রদান করা যেতে পারে:
  • stroke : রঙ, একটি হেক্স স্ট্রিং বা ইংরেজি রঙের নাম হিসাবে দেওয়া।
  • strokeWidth : প্রদান করা হলে, প্রদত্ত প্রস্থের চার্ট এলাকার চারপাশে একটি সীমানা আঁকে (এবং stroke রঙের সাথে)।
প্রকার: স্ট্রিং বা বস্তু
ডিফল্ট: 'সাদা'
chartArea.left

বাম সীমানা থেকে চার্টটি কতদূর আঁকতে হবে।

প্রকার: সংখ্যা বা স্ট্রিং
ডিফল্ট: স্বয়ংক্রিয়
chartArea.top

উপরের বর্ডার থেকে চার্টটি কতদূর আঁকতে হবে।

প্রকার: সংখ্যা বা স্ট্রিং
ডিফল্ট: স্বয়ংক্রিয়
chartArea.width

চার্ট এলাকা প্রস্থ.

প্রকার: সংখ্যা বা স্ট্রিং
ডিফল্ট: স্বয়ংক্রিয়
chartArea.height

চার্ট এলাকার উচ্চতা।

প্রকার: সংখ্যা বা স্ট্রিং
ডিফল্ট: স্বয়ংক্রিয়
chart.subtitle

উপাদান চার্টের জন্য, এই বিকল্পটি সাবটাইটেল নির্দিষ্ট করে। শুধুমাত্র উপাদান চার্ট সাবটাইটেল সমর্থন করে.

প্রকার: স্ট্রিং
ডিফল্ট: নাল
chart.title

উপাদান চার্টের জন্য, এই বিকল্পটি শিরোনাম নির্দিষ্ট করে।

প্রকার: স্ট্রিং
ডিফল্ট: নাল
রং

চার্ট উপাদানের জন্য ব্যবহার করা রং. স্ট্রিংগুলির একটি অ্যারে, যেখানে প্রতিটি উপাদান একটি HTML রঙের স্ট্রিং, উদাহরণস্বরূপ: colors:['red','#004411']

প্রকার: স্ট্রিং এর অ্যারে
ডিফল্ট: ডিফল্ট রং
ডেটা অপাসিটি

ডেটা পয়েন্টের স্বচ্ছতা, 1.0 সম্পূর্ণ অস্বচ্ছ এবং 0.0 সম্পূর্ণ স্বচ্ছ। স্ক্যাটার, হিস্টোগ্রাম, বার এবং কলাম চার্টে, এটি দৃশ্যমান ডেটা বোঝায়: স্ক্যাটার চার্টে বিন্দু এবং অন্যগুলিতে আয়তক্ষেত্র। চার্টে যেখানে ডেটা নির্বাচন করা একটি বিন্দু তৈরি করে, যেমন লাইন এবং এলাকা চার্ট, এটি হোভার বা নির্বাচনের সময় প্রদর্শিত বৃত্তগুলিকে বোঝায়। কম্বো চার্ট উভয় আচরণই প্রদর্শন করে এবং এই বিকল্পটি অন্যান্য চার্টের উপর কোন প্রভাব ফেলে না। (একটি ট্রেন্ডলাইনের অস্বচ্ছতা পরিবর্তন করতে, ট্রেন্ডলাইনের অস্বচ্ছতা দেখুন।)

প্রকার: সংখ্যা
ডিফল্ট: 1.0
ইন্টারঅ্যাক্টিভিটি সক্ষম করুন

চার্ট ব্যবহারকারী-ভিত্তিক ইভেন্টগুলি ছুঁড়েছে বা ব্যবহারকারীর মিথস্ক্রিয়ায় প্রতিক্রিয়া দেখায় কিনা। মিথ্যা হলে, চার্ট 'নির্বাচন' বা অন্যান্য মিথস্ক্রিয়া-ভিত্তিক ইভেন্টগুলি নিক্ষেপ করবে না (কিন্তু প্রস্তুত বা ত্রুটি ইভেন্টগুলি নিক্ষেপ করবে ), এবং ব্যবহারকারীর ইনপুটের উপর নির্ভর করে হোভারটেক্সট প্রদর্শন করবে না বা অন্যথায় পরিবর্তন করবে না।

প্রকার: বুলিয়ান
ডিফল্ট: সত্য
অনুসন্ধানকারী

explorer বিকল্পটি ব্যবহারকারীদের Google চার্ট প্যান এবং জুম করতে দেয়। explorer: {} ডিফল্ট এক্সপ্লোরার আচরণ প্রদান করে, ব্যবহারকারীদের টেনে এনে অনুভূমিকভাবে এবং উল্লম্বভাবে প্যান করতে এবং স্ক্রল করার মাধ্যমে জুম ইন এবং আউট করতে সক্ষম করে।

এই বৈশিষ্ট্যটি পরীক্ষামূলক এবং ভবিষ্যতে রিলিজে পরিবর্তন হতে পারে।

দ্রষ্টব্য: এক্সপ্লোরার শুধুমাত্র অবিচ্ছিন্ন অক্ষের সাথে কাজ করে (যেমন সংখ্যা বা তারিখ)।

প্রকার: বস্তু
ডিফল্ট: নাল
explorer.actions

গুগল চার্ট এক্সপ্লোরার তিনটি ক্রিয়া সমর্থন করে:

  • dragToPan : চার্টের চারপাশে অনুভূমিকভাবে এবং উল্লম্বভাবে প্যান করতে টেনে আনুন। শুধুমাত্র অনুভূমিক অক্ষ বরাবর প্যান করতে, explorer: { axis: 'horizontal' } । একইভাবে উল্লম্ব অক্ষের জন্য।
  • dragToZoom : ব্যবহারকারী স্ক্রোল করার সময় এক্সপ্লোরারের ডিফল্ট আচরণ হল জুম ইন এবং আউট করা। যদি explorer: { actions: ['dragToZoom', 'rightClickToReset'] } ব্যবহার করা হয়, একটি আয়তক্ষেত্রাকার এলাকা জুড়ে টেনে সেই এলাকায় জুম করা হয়। যখনই dragToZoom ব্যবহার করা হয় তখন আমরা rightClickToReset ব্যবহার করার পরামর্শ দিই। জুম কাস্টমাইজেশনের জন্য explorer.maxZoomIn , explorer.maxZoomOut এবং explorer.zoomDelta দেখুন।
  • rightClickToReset : চার্টে রাইট ক্লিক করলে তা মূল প্যান এবং জুম স্তরে ফিরে আসে।
প্রকার: স্ট্রিং এর অ্যারে
ডিফল্ট: ['dragToPan', 'rightClickToReset']
explorer.axis

ডিফল্টরূপে, ব্যবহারকারীরা অনুভূমিকভাবে এবং উল্লম্বভাবে উভয় প্যান করতে পারেন যখন explorer বিকল্পটি ব্যবহার করা হয়। আপনি যদি ব্যবহারকারীদের শুধুমাত্র অনুভূমিকভাবে প্যান করতে চান, explorer: { axis: 'horizontal' } । একইভাবে, explorer: { axis: 'vertical' } উল্লম্ব-শুধু প্যানিং সক্ষম করে।

প্রকার: স্ট্রিং
ডিফল্ট: অনুভূমিক এবং উল্লম্ব উভয় প্যানিং
explorer.keepInBounds

ডিফল্টরূপে, ডেটা যেখানেই থাকুক না কেন ব্যবহারকারীরা চারপাশে প্যান করতে পারে। ব্যবহারকারীরা যাতে মূল চার্টের বাইরে প্যান না করে তা নিশ্চিত করতে, explorer: { keepInBounds: true }

প্রকার: বুলিয়ান
ডিফল্ট: মিথ্যা
explorer.maxZoomIn

এক্সপ্লোরার সর্বাধিক যেটি জুম করতে পারে৷ ডিফল্টরূপে, ব্যবহারকারীরা যথেষ্ট পরিমাণে জুম করতে সক্ষম হবেন যে তারা আসল দৃশ্যের মাত্র 25% দেখতে পাবেন৷ সেটিং explorer: { maxZoomIn: .5 } ব্যবহারকারীদের মূল দৃশ্যের অর্ধেক দেখতে যথেষ্ট পরিমাণে জুম করতে দেয়৷

প্রকার: সংখ্যা
ডিফল্ট: 0.25
explorer.maxZoomOut

এক্সপ্লোরার জুম আউট করতে পারে এমন সর্বোচ্চ। ডিফল্টরূপে, ব্যবহারকারীরা যথেষ্ট পরিমাণে জুম আউট করতে সক্ষম হবেন যে চার্টটি উপলব্ধ স্থানের মাত্র 1/4 গ্রহণ করবে। explorer: { maxZoomOut: 8 } ব্যবহারকারীদের এতটা জুম আউট করতে দেয় যে চার্টটি উপলব্ধ স্থানের মাত্র 1/8 অংশ নেয়৷

প্রকার: সংখ্যা
ডিফল্ট: 4
explorer.zoomDelta

ব্যবহারকারীরা যখন জুম ইন বা আউট করে, তখন তারা কতটা জুম করবে তা explorer.zoomDelta নির্ধারণ করে। সংখ্যা যত ছোট হবে, জুম তত মসৃণ এবং ধীর হবে।

প্রকার: সংখ্যা
ডিফল্ট: 1.5
ফোকাস টার্গেট

সত্তার ধরন যা মাউস হোভারে ফোকাস গ্রহণ করে। মাউস ক্লিক দ্বারা কোন সত্তা নির্বাচন করা হয়েছে এবং কোন ডেটা টেবিল উপাদান ইভেন্টের সাথে যুক্ত তাও প্রভাবিত করে। নিম্নলিখিতগুলির মধ্যে একটি হতে পারে:

  • 'ডেটাম' - একটি একক ডেটা পয়েন্টে ফোকাস করুন। ডেটা টেবিলের একটি কক্ষের সাথে সম্পর্কযুক্ত।
  • 'শ্রেণি' - প্রধান অক্ষ বরাবর সমস্ত ডেটা পয়েন্টের একটি গ্রুপিংয়ের উপর ফোকাস করুন। ডেটা টেবিলের একটি সারির সাথে সম্পর্কযুক্ত।

ফোকাস টার্গেট 'বিভাগে' টুলটিপ সমস্ত বিভাগের মান প্রদর্শন করে। এটি বিভিন্ন সিরিজের মান তুলনা করার জন্য দরকারী হতে পারে।

প্রকার: স্ট্রিং
ডিফল্ট: 'ডেটাম'
অক্ষরের আকার

চার্টের সমস্ত পাঠ্যের ডিফল্ট ফন্টের আকার, পিক্সেলে। আপনি নির্দিষ্ট চার্ট উপাদানগুলির জন্য বৈশিষ্ট্য ব্যবহার করে এটি ওভাররাইড করতে পারেন।

প্রকার: সংখ্যা
ডিফল্ট: স্বয়ংক্রিয়
ফন্টের নাম

চার্টের সমস্ত পাঠ্যের জন্য ডিফল্ট ফন্ট ফেস। আপনি নির্দিষ্ট চার্ট উপাদানগুলির জন্য বৈশিষ্ট্য ব্যবহার করে এটি ওভাররাইড করতে পারেন।

প্রকার: স্ট্রিং
ডিফল্ট: 'Arial'
forceIFrame

একটি ইনলাইন ফ্রেমের ভিতরে চার্ট আঁকে। (উল্লেখ্য যে IE8 এ, এই বিকল্পটি উপেক্ষা করা হয়েছে; সমস্ত IE8 চার্ট আই-ফ্রেমে আঁকা হয়েছে।)

প্রকার: বুলিয়ান
ডিফল্ট: মিথ্যা
হ্যাক্সিস

বিভিন্ন অনুভূমিক অক্ষ উপাদান কনফিগার করার জন্য সদস্য সহ একটি বস্তু। এই বস্তুর বৈশিষ্ট্য নির্দিষ্ট করতে, আপনি অবজেক্ট আক্ষরিক স্বরলিপি ব্যবহার করতে পারেন, যেমনটি এখানে দেখানো হয়েছে:

{
  title: 'Hello',
  titleTextStyle: {
    color: '#FF0000'
  }
}
    
প্রকার: বস্তু
ডিফল্ট: নাল
hAxis.baseline

অনুভূমিক অক্ষের ভিত্তিরেখা।

এই বিকল্পটি শুধুমাত্র একটি continuous অক্ষের জন্য সমর্থিত।

প্রকার: সংখ্যা
ডিফল্ট: স্বয়ংক্রিয়
hAxis.baselineColor

অনুভূমিক অক্ষের জন্য বেসলাইনের রঙ। যেকোনো HTML রঙের স্ট্রিং হতে পারে, উদাহরণস্বরূপ: 'red' বা '#00cc00'

এই বিকল্পটি শুধুমাত্র একটি continuous অক্ষের জন্য সমর্থিত।

প্রকার: সংখ্যা
ডিফল্ট: 'কালো'
hAxis.direction

অনুভূমিক অক্ষ বরাবর মানগুলি যে দিকে বৃদ্ধি পায়। মানগুলির ক্রম বিপরীত করতে -1 নির্দিষ্ট করুন।

প্রকার: 1 বা -1
ডিফল্ট: 1
hAxis.format

সাংখ্যিক বা তারিখ অক্ষ লেবেলের জন্য একটি বিন্যাস স্ট্রিং।

সংখ্যা অক্ষ লেবেলের জন্য, এটি দশমিক বিন্যাস ICU প্যাটার্ন সেটের একটি উপসেট। উদাহরণস্বরূপ, {format:'#,###%'} 10, 7.5 এবং 0.5 মানগুলির জন্য "1,000%", "750%", এবং "50%" মান প্রদর্শন করবে। এছাড়াও আপনি নিম্নলিখিত যে কোনো সরবরাহ করতে পারেন:

  • {format: 'none'} : কোন ফরম্যাটিং ছাড়াই সংখ্যা প্রদর্শন করে (যেমন, 8000000)
  • {format: 'decimal'} : হাজার হাজার বিভাজক সহ সংখ্যা প্রদর্শন করে (যেমন, 8,000,000)
  • {format: 'scientific'} : বৈজ্ঞানিক স্বরলিপিতে সংখ্যা প্রদর্শন করে (যেমন, 8e6)
  • {format: 'currency'} : স্থানীয় মুদ্রায় সংখ্যা প্রদর্শন করে (যেমন, $8,000,000.00)
  • {format: 'percent'} : সংখ্যাগুলিকে শতাংশ হিসাবে প্রদর্শন করে (যেমন, 800,000,000%)
  • {format: 'short'} : সংক্ষিপ্ত সংখ্যা প্রদর্শন করে (যেমন, 8M)
  • {format: 'long'} : সংখ্যাগুলিকে পূর্ণ শব্দ হিসাবে প্রদর্শন করে (যেমন, 8 মিলিয়ন)

তারিখ অক্ষ লেবেলের জন্য, এটি তারিখ বিন্যাসকরণ ICU প্যাটার্ন সেটের একটি উপসেট। উদাহরণস্বরূপ, {format:'MMM d, y'} 2011 সালের প্রথম জুলাই তারিখের জন্য "Jul 1, 2011" মান প্রদর্শন করবে৷

লেবেলে প্রয়োগ করা প্রকৃত বিন্যাসটি API লোড করা হয়েছে এমন লোকেল থেকে প্রাপ্ত। আরও বিশদ বিবরণের জন্য, একটি নির্দিষ্ট লোকেল সহ লোডিং চার্ট দেখুন।

টিক মান এবং গ্রিডলাইন গণনা করার ক্ষেত্রে, সমস্ত প্রাসঙ্গিক গ্রিডলাইন বিকল্পগুলির বেশ কয়েকটি বিকল্প সমন্বয় বিবেচনা করা হবে এবং বিকল্পগুলি প্রত্যাখ্যান করা হবে যদি ফর্ম্যাট করা টিক লেবেলগুলি ডুপ্লিকেট বা ওভারল্যাপ করা হয়। সুতরাং আপনি format:"#" যদি আপনি শুধুমাত্র পূর্ণসংখ্যার টিক মান দেখাতে চান, তবে সচেতন থাকুন যে যদি কোন বিকল্প এই শর্তটি পূরণ না করে, তাহলে কোন গ্রিডলাইন বা টিক দেখানো হবে না।

এই বিকল্পটি শুধুমাত্র একটি continuous অক্ষের জন্য সমর্থিত।

প্রকার: স্ট্রিং
ডিফল্ট: স্বয়ংক্রিয়
hAxis.gridlines

অনুভূমিক অক্ষের গ্রিডলাইনগুলি কনফিগার করার জন্য বৈশিষ্ট্য সহ একটি বস্তু৷ লক্ষ্য করুন যে অনুভূমিক অক্ষ গ্রিডলাইনগুলি উল্লম্বভাবে আঁকা হয়। এই বস্তুর বৈশিষ্ট্য নির্দিষ্ট করতে, আপনি অবজেক্ট আক্ষরিক স্বরলিপি ব্যবহার করতে পারেন, যেমনটি এখানে দেখানো হয়েছে:

{color: '#333', minSpacing: 20}

এই বিকল্পটি শুধুমাত্র একটি continuous অক্ষের জন্য সমর্থিত।

প্রকার: বস্তু
ডিফল্ট: নাল
hAxis.gridlines.color

চার্ট এলাকার ভিতরে অনুভূমিক গ্রিডলাইনের রঙ। একটি বৈধ HTML রঙের স্ট্রিং নির্দিষ্ট করুন।

প্রকার: স্ট্রিং
ডিফল্ট: '#CCC'
hAxis.gridlines.count

চার্ট এলাকার ভিতরে অনুভূমিক গ্রিডলাইনের আনুমানিক সংখ্যা। আপনি gridlines.count এর জন্য একটি ধনাত্মক সংখ্যা উল্লেখ করলে, এটি gridlines.count মধ্যে minSpacing গণনা করতে ব্যবহৃত হবে। আপনি শুধুমাত্র একটি গ্রিডলাইন আঁকতে 1 এর মান নির্দিষ্ট করতে পারেন, অথবা কোন গ্রিডলাইন আঁকতে 0 এর মান উল্লেখ করতে পারেন। অন্যান্য বিকল্পের উপর ভিত্তি করে স্বয়ংক্রিয়ভাবে গ্রিডলাইনের সংখ্যা গণনা করতে -1 নির্দিষ্ট করুন, যা ডিফল্ট।

প্রকার: সংখ্যা
ডিফল্ট: -1
hAxis.gridlines.interval

সংলগ্ন গ্রিডলাইনগুলির মধ্যে আকারের একটি বিন্যাস (ডাটা মান হিসাবে, পিক্সেল নয়)। এই বিকল্পটি এই সময়ে শুধুমাত্র সাংখ্যিক অক্ষের জন্য, কিন্তু এটি gridlines.units.<unit>.interval বিকল্পগুলির সাথে সাদৃশ্যপূর্ণ যা শুধুমাত্র তারিখ এবং সময়ের জন্য ব্যবহৃত হয়। রৈখিক স্কেলগুলির জন্য, ডিফল্ট হল [1, 2, 2.5, 5] যার অর্থ গ্রিডলাইন মানগুলি প্রতিটি ইউনিটে (1), জোড় একক (2) বা 2.5 বা 5 এর গুণিতকগুলিতে পড়তে পারে। 10 গুণের যে কোনও শক্তি এই মানগুলিও বিবেচনা করা হয় (যেমন [10, 20, 25, 50] এবং [.1, .2, .25, .5])। লগ স্কেলগুলির জন্য, ডিফল্ট হল [1, 2, 5]

প্রকার: 1 এবং 10 এর মধ্যে সংখ্যা, 10 সহ নয়।
ডিফল্ট: গণনা করা
hAxis.gridlines.minSpacing

হ্যাক্সিস প্রধান গ্রিডলাইনের মধ্যে ন্যূনতম স্ক্রীন স্পেস, পিক্সেলে। প্রধান গ্রিডলাইনগুলির জন্য ডিফল্ট হল লিনিয়ার স্কেলের জন্য 40 এবং লগ স্কেলের জন্য 20 ৷ আপনি যদি count নির্দিষ্ট করেন এবং minSpacing গণনা থেকে গণনা করা হয়। এবং বিপরীতভাবে, আপনি যদি minSpacing উল্লেখ করেন এবং গণনা না করেন তবে count মিনস্পেসিং থেকে গণনা করা হয়। আপনি উভয় নির্দিষ্ট করলে, minSpacing ওভাররাইড করে।

প্রকার: সংখ্যা
ডিফল্ট: গণনা করা
hAxis.gridlines.multiple

সমস্ত গ্রিডলাইন এবং টিক মান এই বিকল্পের মানের একাধিক হতে হবে। মনে রাখবেন, ব্যবধানের বিপরীতে, গুণের 10 গুণের ক্ষমতা বিবেচনা করা হয় না। সুতরাং আপনি gridlines.multiple = 1 নির্দিষ্ট করে টিকগুলিকে পূর্ণসংখ্যা হতে বাধ্য করতে পারেন, অথবা gridlines.multiple = 1000 নির্দিষ্ট করে টিকগুলিকে 1000 এর গুণিতক হতে বাধ্য করতে পারেন।

প্রকার: সংখ্যা
ডিফল্ট: 1
hAxis.gridlines.units

চার্ট কম্পিউটেড গ্রিডলাইনগুলির সাথে ব্যবহার করার সময় তারিখ/তারিখ সময়/টাইমঅফডে ডেটা প্রকারের বিভিন্ন দিকগুলির জন্য ডিফল্ট ফর্ম্যাটকে ওভাররাইড করে৷ বছর, মাস, দিন, ঘন্টা, মিনিট, সেকেন্ড এবং মিলিসেকেন্ডের জন্য বিন্যাস করার অনুমতি দেয়।

সাধারণ বিন্যাস হল:

gridlines: {
  units: {
    years: {format: [/*format strings here*/]},
    months: {format: [/*format strings here*/]},
    days: {format: [/*format strings here*/]}
    hours: {format: [/*format strings here*/]}
    minutes: {format: [/*format strings here*/]}
    seconds: {format: [/*format strings here*/]},
    milliseconds: {format: [/*format strings here*/]},
  }
}
    

অতিরিক্ত তথ্য তারিখ এবং সময় পাওয়া যাবে.

প্রকার: বস্তু
ডিফল্ট: নাল
hAxis.minorGridlines

hAxis.gridlines বিকল্পের অনুরূপ অনুভূমিক অক্ষের ছোট গ্রিডলাইনগুলি কনফিগার করার জন্য সদস্যদের সাথে একটি বস্তু৷

এই বিকল্পটি শুধুমাত্র একটি continuous অক্ষের জন্য সমর্থিত।

প্রকার: বস্তু
ডিফল্ট: নাল
hAxis.minorGridlines.color

লেখচিত্র এলাকার ভিতরে অনুভূমিক ক্ষুদ্র গ্রিডলাইনের রঙ। একটি বৈধ HTML রঙের স্ট্রিং নির্দিষ্ট করুন।

প্রকার: স্ট্রিং
ডিফল্ট: গ্রিডলাইন এবং পটভূমির রঙের মিশ্রণ
hAxis.minorGridlines.count

minorGridlines.count বিকল্পটি বেশিরভাগই অবহেলিত, কাউন্ট 0 সেট করে ছোট গ্রিডলাইনগুলি নিষ্ক্রিয় করা ছাড়া। ছোট গ্রিডলাইনের সংখ্যা এখন সম্পূর্ণভাবে প্রধান গ্রিডলাইনগুলির মধ্যে ব্যবধানের উপর নির্ভর করে ( hAxis.gridlines.interval দেখুন) এবং ন্যূনতম প্রয়োজনীয় স্থান (দেখুন) hAxis.minorGridlines.minSpacing )।

প্রকার: সংখ্যা
ডিফল্ট: 1
hAxis.minorGridlines.interval

minorGridlines.interval বিকল্পটি প্রধান গ্রিডলাইন ব্যবধান বিকল্পের মতো, তবে যে ব্যবধানটি বেছে নেওয়া হয়েছে তা সর্বদা প্রধান গ্রিডলাইন ব্যবধানের একটি সমান ভাজক হবে। রৈখিক স্কেলগুলির জন্য ডিফল্ট ব্যবধান হল [1, 1.5, 2, 2.5, 5] , এবং লগ স্কেলগুলির জন্য হল [1, 2, 5]

প্রকার: সংখ্যা
ডিফল্ট: 1
hAxis.minorGridlines.minSpacing

ন্যূনতম প্রয়োজনীয় স্থান, পিক্সেলে, সংলগ্ন ছোট গ্রিডলাইনের মধ্যে এবং ছোট এবং বড় গ্রিডলাইনের মধ্যে। ডিফল্ট মান হল লিনিয়ার স্কেলের জন্য প্রধান গ্রিডলাইনের 1/2 মিনিট স্পেসিং এবং লগ স্কেলের জন্য 1/5 মিনিট স্পেসিং৷

প্রকার: সংখ্যা
ডিফল্ট: গণনা করা
hAxis.minorGridlines.multiple

প্রধান gridlines.multiple জন্য একই.

প্রকার: সংখ্যা
ডিফল্ট: 1
hAxis.minorGridlines.units

চার্ট কম্পিউটেড মাইনরগ্রিডলাইনগুলির সাথে ব্যবহার করার সময় তারিখ/তারিখের সময়/সময়ের দিনের ডেটা প্রকারের বিভিন্ন দিকগুলির জন্য ডিফল্ট ফর্ম্যাটকে ওভাররাইড করে৷ বছর, মাস, দিন, ঘন্টা, মিনিট, সেকেন্ড এবং মিলিসেকেন্ডের জন্য বিন্যাস করার অনুমতি দেয়।

সাধারণ বিন্যাস হল:

gridlines: {
  units: {
    years: {format: [/*format strings here*/]},
    months: {format: [/*format strings here*/]},
    days: {format: [/*format strings here*/]}
    hours: {format: [/*format strings here*/]}
    minutes: {format: [/*format strings here*/]}
    seconds: {format: [/*format strings here*/]},
    milliseconds: {format: [/*format strings here*/]},
  }
}
    

অতিরিক্ত তথ্য তারিখ এবং সময় পাওয়া যাবে.

প্রকার: বস্তু
ডিফল্ট: নাল
hAxis.logScale

hAxis বৈশিষ্ট্য যা অনুভূমিক অক্ষকে একটি লগারিদমিক স্কেল করে (সমস্ত মান ধনাত্মক হওয়া প্রয়োজন)। হ্যাঁ জন্য সত্য সেট করুন.

এই বিকল্পটি শুধুমাত্র একটি continuous অক্ষের জন্য সমর্থিত।

প্রকার: বুলিয়ান
ডিফল্ট: মিথ্যা
hAxis.scaleType

hAxis সম্পত্তি যা অনুভূমিক অক্ষকে লগারিদমিক স্কেল করে। নিম্নলিখিতগুলির মধ্যে একটি হতে পারে:

  • null - কোন লগারিদমিক স্কেলিং সঞ্চালিত হয় না।
  • 'লগ' - লগারিদমিক স্কেলিং। নেতিবাচক এবং শূন্য মান প্লট করা হয় না। এই বিকল্পটি হ্যাক্সিস সেট করার hAxis: { logscale: true }
  • 'মিররলগ' - লগারিদমিক স্কেলিং যাতে ঋণাত্মক এবং শূন্য মান প্লট করা হয়। একটি ঋণাত্মক সংখ্যার প্লট করা মান হল পরম মানের লগের ঋণাত্মক। 0 এর কাছাকাছি মান একটি রৈখিক স্কেলে প্লট করা হয়।

এই বিকল্পটি শুধুমাত্র একটি continuous অক্ষের জন্য সমর্থিত।

প্রকার: স্ট্রিং
ডিফল্ট: নাল
hAxis.textPosition

লেখচিত্র এলাকার সাপেক্ষে অনুভূমিক অক্ষ পাঠের অবস্থান। সমর্থিত মান: 'আউট', 'ইন', 'কোনটি নয়'।

প্রকার: স্ট্রিং
ডিফল্ট: 'আউট'
hAxis.textStyle

একটি বস্তু যা অনুভূমিক অক্ষ পাঠের শৈলী নির্দিষ্ট করে। বস্তুর এই বিন্যাস আছে:

{ color: <string>,
  fontName: <string>,
  fontSize: <number>,
  bold: <boolean>,
  italic: <boolean> }
    

color যেকোনো HTML রঙের স্ট্রিং হতে পারে, উদাহরণস্বরূপ: 'red' বা '#00cc00' । এছাড়াও fontName এবং fontSize দেখুন।

প্রকার: বস্তু
ডিফল্ট: {color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
hAxis.ticks

স্বয়ংক্রিয়ভাবে উৎপন্ন X-অক্ষ টিকগুলিকে নির্দিষ্ট অ্যারে দিয়ে প্রতিস্থাপন করে। অ্যারের প্রতিটি উপাদান একটি বৈধ টিক মান (যেমন একটি সংখ্যা, তারিখ, তারিখ সময়, বা timeofday), অথবা একটি বস্তু হওয়া উচিত। যদি এটি একটি বস্তু হয়, এটিতে টিক মানের জন্য একটি v বৈশিষ্ট্য থাকা উচিত এবং লেবেল হিসাবে প্রদর্শিত হবে আক্ষরিক স্ট্রিং ধারণকারী একটি ঐচ্ছিক f বৈশিষ্ট্য।

আপনি ওভাররাইড করার জন্য একটি viewWindow.min বা viewWindow.max নির্দিষ্ট না করলে ভিউউইন্ডো স্বয়ংক্রিয়ভাবে ন্যূনতম এবং সর্বোচ্চ টিক অন্তর্ভুক্ত করতে প্রসারিত হবে।

উদাহরণ:

  • hAxis: { ticks: [5,10,15,20] }
  • hAxis: { ticks: [{v:32, f:'thirty two'}, {v:64, f:'sixty four'}] }
  • hAxis: { ticks: [new Date(2014,3,15), new Date(2013,5,15)] }
  • hAxis: { ticks: [16, {v:32, f:'thirty two'}, {v:64, f:'sixty four'}, 128] }

এই বিকল্পটি শুধুমাত্র একটি continuous অক্ষের জন্য সমর্থিত।

প্রকার: উপাদানের অ্যারে
ডিফল্ট: স্বয়ংক্রিয়
hAxis.title

hAxis সম্পত্তি যা অনুভূমিক অক্ষের শিরোনাম নির্দিষ্ট করে।

প্রকার: স্ট্রিং
ডিফল্ট: নাল
hAxis.titleTextStyle

একটি বস্তু যা অনুভূমিক অক্ষ শিরোনাম পাঠ শৈলী নির্দিষ্ট করে। বস্তুর এই বিন্যাস আছে:

{ color: <string>,
  fontName: <string>,
  fontSize: <number>,
  bold: <boolean>,
  italic: <boolean> }
    

color যেকোনো HTML রঙের স্ট্রিং হতে পারে, উদাহরণস্বরূপ: 'red' বা '#00cc00' । এছাড়াও fontName এবং fontSize দেখুন।

প্রকার: বস্তু
ডিফল্ট: {color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
hAxis.allowContainerBoundaryTextCutoff

মিথ্যা হলে, চার্ট ধারক দ্বারা ক্রপ করার অনুমতি না দিয়ে বাইরেরতম লেবেলগুলিকে লুকিয়ে রাখবে৷ সত্য হলে, লেবেল ক্রপ করার অনুমতি দেবে।

এই বিকল্পটি শুধুমাত্র একটি discrete অক্ষের জন্য সমর্থিত।

প্রকার: বুলিয়ান
ডিফল্ট: মিথ্যা
hAxis.slantedText

সত্য হলে, একটি কোণে অনুভূমিক অক্ষের পাঠ্য আঁকুন, অক্ষ বরাবর আরও পাঠ্য ফিট করতে সাহায্য করতে; মিথ্যা হলে, অনুভূমিক অক্ষের টেক্সট সোজা আঁকুন। ডিফল্ট আচরণ হল টেক্সটকে তির্যক করা যদি এটি সোজা আঁকার সময় সব ফিট না হয়। লক্ষ্য করুন যে এই বিকল্পটি তখনই পাওয়া যায় যখন hAxis.textPosition 'out' এ সেট করা থাকে (যা ডিফল্ট)। তারিখ এবং সময়ের জন্য ডিফল্ট false .

প্রকার: বুলিয়ান
ডিফল্ট: স্বয়ংক্রিয়
hAxis.slantedTextAngle

অনুভূমিক অক্ষ পাঠের কোণ, যদি এটি তির্যকভাবে আঁকা হয়। hAxis.slantedText false হলে বা স্বয়ংক্রিয় মোডে থাকলে উপেক্ষা করা হয়, এবং চার্ট অনুভূমিকভাবে পাঠ্য আঁকার সিদ্ধান্ত নিয়েছে। কোণটি ধনাত্মক হলে ঘূর্ণন ঘড়ির কাঁটার বিপরীতে এবং ঋণাত্মক হলে ঘড়ির কাঁটার দিকে।

প্রকার: সংখ্যা, -90-90
ডিফল্ট: 30
hAxis.max Alternation

অনুভূমিক অক্ষ পাঠের সর্বোচ্চ সংখ্যক স্তর। যদি অক্ষ টেক্সট লেবেলগুলি খুব বেশি জমজমাট হয়ে যায়, তাহলে সার্ভারটি পার্শ্ববর্তী লেবেলগুলিকে উপরে বা নীচে স্থানান্তরিত করতে পারে যাতে লেবেলগুলিকে কাছাকাছি ফিট করা যায়৷ এই মানটি ব্যবহার করার জন্য সর্বাধিক সংখ্যক স্তর নির্দিষ্ট করে; সার্ভার কম মাত্রা ব্যবহার করতে পারে, যদি লেবেল ওভারল্যাপিং ছাড়াই ফিট হতে পারে। তারিখ এবং সময়ের জন্য, ডিফল্ট হল 1।

প্রকার: সংখ্যা
ডিফল্ট: 2
hAxis.maxTextLines

পাঠ্য লেবেলগুলির জন্য সর্বাধিক সংখ্যক লাইন অনুমোদিত৷ লেবেলগুলি অনেক লম্বা হলে একাধিক লাইন বিস্তৃত করতে পারে, এবং লাইনের সংখ্যা, ডিফল্টরূপে, উপলব্ধ স্থানের উচ্চতা দ্বারা সীমিত।

প্রকার: সংখ্যা
ডিফল্ট: স্বয়ংক্রিয়
hAxis.minTextSpacing

ন্যূনতম অনুভূমিক ব্যবধান, পিক্সেলে, দুটি সংলগ্ন পাঠ্য লেবেলের মধ্যে অনুমোদিত৷ যদি লেবেলগুলি খুব ঘনভাবে ফাঁক করা হয়, বা সেগুলি খুব দীর্ঘ হয়, তাহলে ব্যবধান এই থ্রেশহোল্ডের নীচে নেমে যেতে পারে এবং এই ক্ষেত্রে একটি লেবেল-আনক্লাটার ব্যবস্থা প্রয়োগ করা হবে (যেমন, লেবেলগুলিকে ছাঁটাই করা বা তাদের কিছু বাদ দেওয়া)।

প্রকার: সংখ্যা
ডিফল্ট: hAxis.textStyle.fontSize এর মান
hAxis.showTextEvery

কয়টি অনুভূমিক অক্ষের লেবেল দেখাতে হবে, যেখানে 1 মানে প্রতিটি লেবেল দেখান, 2 মানে প্রত্যেকটি লেবেল দেখান ইত্যাদি। ডিফল্ট হল ওভারল্যাপ না করে যতটা সম্ভব লেবেল দেখানোর চেষ্টা করা।

প্রকার: সংখ্যা
ডিফল্ট: স্বয়ংক্রিয়
hAxis.maxValue

অনুভূমিক অক্ষের সর্বোচ্চ মানকে নির্দিষ্ট মানের দিকে নিয়ে যায়; এটি বেশিরভাগ চার্টে ডানদিকে থাকবে। উপেক্ষা করা হয় যদি এটি ডেটার সর্বোচ্চ x-মানের চেয়ে ছোট একটি মান সেট করা থাকে। hAxis.viewWindow.max এই সম্পত্তি ওভাররাইড করে।

এই বিকল্পটি শুধুমাত্র একটি continuous অক্ষের জন্য সমর্থিত।

প্রকার: সংখ্যা
ডিফল্ট: স্বয়ংক্রিয়
hAxis.minValue

অনুভূমিক অক্ষের ন্যূনতম মানকে নির্দিষ্ট মানের দিকে নিয়ে যায়; এটি বেশিরভাগ চার্টে বাম দিকে থাকবে। উপেক্ষা করা হয় যদি এটি ডেটার ন্যূনতম x-মানের চেয়ে বেশি একটি মান সেট করা থাকে। hAxis.viewWindow.min এই সম্পত্তি ওভাররাইড করে।

এই বিকল্পটি শুধুমাত্র একটি continuous অক্ষের জন্য সমর্থিত।

প্রকার: সংখ্যা
ডিফল্ট: স্বয়ংক্রিয়
hAxis.viewWindowMode

Specifies how to scale the horizontal axis to render the values within the chart area. The following string values are supported:

  • 'pretty' - Scale the horizontal values so that the maximum and minimum data values are rendered a bit inside the left and right of the chart area. The viewWindow is expanded to the nearest major gridline for numbers, or the nearest minor gridline for dates and times.
  • 'maximized' - Scale the horizontal values so that the maximum and minimum data values touch the left and right of the chart area. This will cause haxis.viewWindow.min and haxis.viewWindow.max to be ignored.
  • 'explicit' - A deprecated option for specifying the left and right scale values of the chart area. (Deprecated because it's redundant with haxis.viewWindow.min and haxis.viewWindow.max .) Data values outside these values will be cropped. You must specify an hAxis.viewWindow object describing the maximum and minimum values to show.

This option is only supported for a continuous axis.

Type: string
Default: Equivalent to 'pretty', but haxis.viewWindow.min and haxis.viewWindow.max take precedence if used.
hAxis.viewWindow

Specifies the cropping range of the horizontal axis.

Type: object
Default: null
hAxis.viewWindow.max
  • For a continuous axis:

    The maximum horizontal data value to render.

  • For a discrete axis:

    The zero-based row index where the cropping window ends. Data points at this index and higher will be cropped out. In conjunction with vAxis.viewWindowMode.min , it defines a half-opened range [min, max) that denotes the element indices to display. In other words, every index such that min <= index < max will be displayed.

Ignored when hAxis.viewWindowMode is 'pretty' or 'maximized'.

Type: number
Default: auto
hAxis.viewWindow.min
  • For a continuous axis:

    The minimum horizontal data value to render.

  • For a discrete axis:

    The zero-based row index where the cropping window begins. Data points at indices lower than this will be cropped out. In conjunction with vAxis.viewWindowMode.max , it defines a half-opened range [min, max) that denotes the element indices to display. In other words, every index such that min <= index < max will be displayed.

Ignored when hAxis.viewWindowMode is 'pretty' or 'maximized'.

Type: number
Default: auto
height

Height of the chart, in pixels.

Type: number
Default: height of the containing element
isStacked

If set to true, stacks the elements for all series at each domain value. Note: In Column , Area , and SteppedArea charts, Google Charts reverses the order of legend items to better correspond with the stacking of the series elements (Eg series 0 will be the bottom-most legend item). This does not apply to Bar Charts.

The isStacked option also supports 100% stacking, where the stacks of elements at each domain value are rescaled to add up to 100%.

The options for isStacked are:

  • false — elements will not stack. This is the default option.
  • true — stacks elements for all series at each domain value.
  • 'percent' — stacks elements for all series at each domain value and rescales them such that they add up to 100%, with each element's value calculated as a percentage of 100%.
  • 'relative' — stacks elements for all series at each domain value and rescales them such that they add up to 1, with each element's value calculated as a fraction of 1.
  • 'absolute' — functions the same as isStacked: true .

For 100% stacking, the calculated value for each element will appear in the tooltip after its actual value.

The target axis will default to tick values based on the relative 0-1 scale as fractions of 1 for 'relative' , and 0-100% for 'percent' ( Note: when using the 'percent' option, the axis/tick values are displayed as percentages, however the actual values are the relative 0-1 scale values. This is because the percentage axis ticks are the result of applying a format of "#.##%" to the relative 0-1 scale values. When using isStacked: 'percent' , be sure to specify any ticks/gridlines using the relative 0-1 scale values). You can customize the gridlines/tick values and formatting using the appropriate hAxis/vAxis options.

100% stacking only supports data values of type number , and must have a baseline of zero.

Type: boolean/string
Default: false
legend

An object with members to configure various aspects of the legend. To specify properties of this object, you can use object literal notation, as shown here:

{position: 'top', textStyle: {color: 'blue', fontSize: 16}}
Type: object
Default: null
legend.pageIndex

Initial selected zero-based page index of the legend.

Type: number
Default: 0
legend.position

Position of the legend. Can be one of the following:

  • 'bottom' - Below the chart.
  • 'left' - To the left of the chart, provided the left axis has no series associated with it. So if you want the legend on the left, use the option targetAxisIndex: 1 .
  • 'in' - Inside the chart, by the top left corner.
  • 'none' - No legend is displayed.
  • 'right' - To the right of the chart. Incompatible with the vAxes option.
  • 'top' - Above the chart.
Type: string
Default: 'right'
legend.alignment

Alignment of the legend. Can be one of the following:

  • 'start' - Aligned to the start of the area allocated for the legend.
  • 'center' - Centered in the area allocated for the legend.
  • 'end' - Aligned to the end of the area allocated for the legend.

Start, center, and end are relative to the style -- vertical or horizontal -- of the legend. For example, in a 'right' legend, 'start' and 'end' are at the top and bottom, respectively; for a 'top' legend, 'start' and 'end' would be at the left and right of the area, respectively.

The default value depends on the legend's position. For 'bottom' legends, the default is 'center'; other legends default to 'start'.

Type: string
Default: automatic
legend.textStyle

An object that specifies the legend text style. The object has this format:

{ color: <string>,
  fontName: <string>,
  fontSize: <number>,
  bold: <boolean>,
  italic: <boolean> }
    

The color can be any HTML color string, for example: 'red' or '#00cc00' . Also see fontName and fontSize .

Type: object
Default: {color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
orientation

The orientation of the chart. When set to 'vertical' , rotates the axes of the chart so that (for instance) a column chart becomes a bar chart, and an area chart grows rightward instead of up:

Type: string
Default: 'horizontal'
reverseCategories

If set to true, will draw series from right to left. The default is to draw left-to-right.

This option is only supported for a discrete major axis.

Type: boolean
Default: false
series

An array of objects, each describing the format of the corresponding series in the chart. To use default values for a series, specify an empty object {}. If a series or a value is not specified, the global value will be used. Each object supports the following properties:

  • annotations - An object to be applied to annotations for this series. This can be used to control, for instance, the textStyle for the series:

    series: {
      0: {
        annotations: {
          textStyle: {fontSize: 12, color: 'red' }
        }
      }
    }
              

    See the various annotations options for a more complete list of what can be customized.

  • color - The color to use for this series. Specify a valid HTML color string.
  • targetAxisIndex - Which axis to assign this series to, where 0 is the default axis, and 1 is the opposite axis. Default value is 0; set to 1 to define a chart where different series are rendered against different axes. At least one series much be allocated to the default axis. You can define a different scale for different axes.
  • visibleInLegend - A boolean value, where true means that the series should have a legend entry, and false means that it should not. Default is true.

You can specify either an array of objects, each of which applies to the series in the order given, or you can specify an object where each child has a numeric key indicating which series it applies to. For example, the following two declarations are identical, and declare the first series as black and absent from the legend, and the fourth as red and absent from the legend:

series: [
  {color: 'black', visibleInLegend: false}, {}, {},
  {color: 'red', visibleInLegend: false}
]
series: {
  0:{color: 'black', visibleInLegend: false},
  3:{color: 'red', visibleInLegend: false}
}
    
Type: Array of objects, or object with nested objects
Default: {}
theme

A theme is a set of predefined option values that work together to achieve a specific chart behavior or visual effect. Currently only one theme is available:

  • 'maximized' - Maximizes the area of the chart, and draws the legend and all of the labels inside the chart area. Sets the following options:
    chartArea: {width: '100%', height: '100%'},
    legend: {position: 'in'},
    titlePosition: 'in', axisTitlesPosition: 'in',
    hAxis: {textPosition: 'in'}, vAxis: {textPosition: 'in'}
            
Type: string
Default: null
title

Text to display above the chart.

Type: string
Default: no title
titlePosition

Where to place the chart title, compared to the chart area. Supported values:

  • in - Draw the title inside the chart area.
  • out - Draw the title outside the chart area.
  • none - Omit the title.
Type: string
Default: 'out'
titleTextStyle

An object that specifies the title text style. The object has this format:

{ color: <string>,
  fontName: <string>,
  fontSize: <number>,
  bold: <boolean>,
  italic: <boolean> }
    

The color can be any HTML color string, for example: 'red' or '#00cc00' . Also see fontName and fontSize .

Type: object
Default: {color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
tooltip

An object with members to configure various tooltip elements. To specify properties of this object, you can use object literal notation, as shown here:

{textStyle: {color: '#FF0000'}, showColorCode: true}
Type: object
Default: null
tooltip.ignoreBounds

If set to true , allows the drawing of tooltips to flow outside of the bounds of the chart on all sides.

Note: This only applies to HTML tooltips. If this is enabled with SVG tooltips, any overflow outside of the chart bounds will be cropped. See Customizing Tooltip Content for more details.

Type: boolean
Default: false
tooltip.isHtml

If set to true, use HTML-rendered (rather than SVG-rendered) tooltips. See Customizing Tooltip Content for more details.

Note: customization of the HTML tooltip content via the tooltip column data role is not supported by the Bubble Chart visualization.

Type: boolean
Default: false
tooltip.showColorCode

If true, show colored squares next to the series information in the tooltip. The default is true when focusTarget is set to 'category', otherwise the default is false.

Type: boolean
Default: automatic
tooltip.textStyle

An object that specifies the tooltip text style. The object has this format:

{ color: <string>,
  fontName: <string>,
  fontSize: <number>,
  bold: <boolean>,
  italic: <boolean> }
    

The color can be any HTML color string, for example: 'red' or '#00cc00' . Also see fontName and fontSize .

Type: object
Default: {color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
tooltip.trigger

The user interaction that causes the tooltip to be displayed:

  • 'focus' - The tooltip will be displayed when the user hovers over the element.
  • 'none' - The tooltip will not be displayed.
  • 'selection' - The tooltip will be displayed when the user selects the element.
Type: string
Default: 'focus'
trendlines

Displays trendlines on the charts that support them. By default, linear trendlines are used, but this can be customized with the trendlines. n .type option.

Trendlines are specified on a per-series basis, so most of the time your options will look like this:

var options = {
  trendlines: {
    0: {
      type: 'linear',
      color: 'green',
      lineWidth: 3,
      opacity: 0.3,
      showR2: true,
      visibleInLegend: true
    }
  }
}
    
Type: object
Default: null
trendlines.n.color

The color of the trendline , expressed as either an English color name or a hex string.

Type: string
Default: default series color
trendlines.n.degree

For trendlines of type: 'polynomial' , the degree of the polynomial ( 2 for quadratic, 3 for cubic, and so on). (The default degree may change from 3 to 2 in an upcoming release of Google Charts.)

Type: number
Default: 3
trendlines.n.labelInLegend

If set, the trendline will appear in the legend as this string.

Type: string
Default: null
trendlines.n.lineWidth

The line width of the trendline , in pixels.

Type: number
Default: 2
trendlines.n.opacity

The transparency of the trendline , from 0.0 (transparent) to 1.0 (opaque).

Type: number
Default: 1.0
trendlines.n.pointSize

Trendlines are constucted by stamping a bunch of dots on the chart; this rarely-needed option lets you customize the size of the dots. The trendline's lineWidth option will usually be preferable. However, you'll need this option if you're using the global pointSize option and want a different point size for your trendlines.

Type: number
Default: 1
trendlines.n.pointsVisible

Trendlines are constucted by stamping a bunch of dots on the chart. The trendline's pointsVisible option determines whether the points for a particular trendline are visible.

Type: boolean
Default: true
trendlines.n.showR2

Whether to show the coefficient of determination in the legend or trendline tooltip.

Type: boolean
Default: false
trendlines.n.type

Whether the trendlines is 'linear' (the default), 'exponential' , or 'polynomial' .

Type: string
Default: linear
trendlines.n.visibleInLegend

Whether the trendline equation appears in the legend. (It will appear in the trendline tooltip.)

Type: boolean
Default: false
vAxes

Specifies properties for individual vertical axes, if the chart has multiple vertical axes. Each child object is a vAxis object, and can contain all the properties supported by vAxis . These property values override any global settings for the same property.

To specify a chart with multiple vertical axes, first define a new axis using series.targetAxisIndex , then configure the axis using vAxes . The following example assigns series 2 to the right axis and specifies a custom title and text style for it:

{
  series: {
    2: {
      targetAxisIndex:1
    }
  },
  vAxes: {
    1: {
      title:'Losses',
      textStyle: {color: 'red'}
    }
  }
}
    

This property can be either an object or an array: the object is a collection of objects, each with a numeric label that specifies the axis that it defines--this is the format shown above; the array is an array of objects, one per axis. For example, the following array-style notation is identical to the vAxis object shown above:

vAxes: [
  {}, // Nothing specified for axis 0
  {
    title:'Losses',
    textStyle: {color: 'red'} // Axis 1
  }
]
    
Type: Array of object, or object with child objects
Default: null
vAxis

An object with members to configure various vertical axis elements. To specify properties of this object, you can use object literal notation, as shown here:

{title: 'Hello', titleTextStyle: {color: '#FF0000'}}
Type: object
Default: null
vAxis.baseline

vAxis property that specifies the baseline for the vertical axis. If the baseline is larger than the highest grid line or smaller than the lowest grid line, it will be rounded to the closest gridline.

Type: number
Default: automatic
vAxis.baselineColor

Specifies the color of the baseline for the vertical axis. Can be any HTML color string, for example: 'red' or '#00cc00' .

Type: number
Default: 'black'
vAxis.direction

The direction in which the values along the vertical axis grow. By default, low values are on the bottom of the chart. Specify -1 to reverse the order of the values.

Type: 1 or -1
Default: 1
vAxis.format

A format string for numeric axis labels. This is a subset of the ICU pattern set . For instance, {format:'#,###%'} will display values "1,000%", "750%", and "50%" for values 10, 7.5, and 0.5. You can also supply any of the following:

  • {format: 'none'} : displays numbers with no formatting (eg, 8000000)
  • {format: 'decimal'} : displays numbers with thousands separators (eg, 8,000,000)
  • {format: 'scientific'} : displays numbers in scientific notation (eg, 8e6)
  • {format: 'currency'} : displays numbers in the local currency (eg, $8,000,000.00)
  • {format: 'percent'} : displays numbers as percentages (eg, 800,000,000%)
  • {format: 'short'} : displays abbreviated numbers (eg, 8M)
  • {format: 'long'} : displays numbers as full words (eg, 8 million)

The actual formatting applied to the label is derived from the locale the API has been loaded with. For more details, see loading charts with a specific locale .

In computing tick values and gridlines, several alternative combinations of all the relevant gridline options will be considered and alternatives will be rejected if the formatted tick labels would be duplicated or overlap. So you can specify format:"#" if you want to only show integer tick values, but be aware that if no alternative satisfies this condition, no gridlines or ticks will be shown.

Type: string
Default: auto
vAxis.gridlines

An object with members to configure the gridlines on the vertical axis. Note that vertical axis gridlines are drawn horizontally. To specify properties of this object, you can use object literal notation, as shown here:

{color: '#333', minSpacing: 20}
Type: object
Default: null
vAxis.gridlines.color

The color of the vertical gridlines inside the chart area. Specify a valid HTML color string.

Type: string
Default: '#CCC'
vAxis.gridlines.count

The approximate number of horizontal gridlines inside the chart area. If you specify a positive number for gridlines.count , it will be used to compute the minSpacing between gridlines. You can specify a value of 1 to only draw one gridline, or 0 to draw no gridlines. Specify -1, which is the default, to automatically compute the number of gridlines based on other options.

Type: number
Default: -1
vAxis.gridlines.interval

An array of sizes (as data values, not pixels) between adjacent gridlines. This option is only for numeric axes at this time, but it is analogous to the gridlines.units.<unit>.interval options which are used only for dates and times. For linear scales, the default is [1, 2, 2.5, 5] which means the gridline values can fall on every unit (1), on even units (2), or on multiples of 2.5 or 5. Any power of 10 times these values is also considered (eg [10, 20, 25, 50] and [.1, .2, .25, .5]). For log scales, the default is [1, 2, 5] .

Type: number between 1 and 10, not including 10.
Default: computed
vAxis.gridlines.minSpacing

The minimum screen space, in pixels, between hAxis major gridlines. The default for major gridlines is 40 for linear scales, and 20 for log scales. If you specify the count and not the minSpacing , the minSpacing is computed from the count. And conversely, if you specify the minSpacing and not the count , the count is computed from the minSpacing. If you specify both, the minSpacing overrides.

Type: number
Default: computed
vAxis.gridlines.multiple

All gridline and tick values must be a multiple of this option's value. Note that, unlike for intervals, powers of 10 times the multiple are not considered. So you can force ticks to be integers by specifying gridlines.multiple = 1 , or force ticks to be multiples of 1000 by specifying gridlines.multiple = 1000 .

Type: number
Default: 1
vAxis.gridlines.units

Overrides the default format for various aspects of date/datetime/timeofday data types when used with chart computed gridlines. Allows formatting for years, months, days, hours, minutes, seconds, and milliseconds.

General format is:

gridlines: {
  units: {
    years: {format: [/*format strings here*/]},
    months: {format: [/*format strings here*/]},
    days: {format: [/*format strings here*/]},
    hours: {format: [/*format strings here*/]},
    minutes: {format: [/*format strings here*/]},
    seconds: {format: [/*format strings here*/]},
    milliseconds: {format: [/*format strings here*/]}
  }
}
    

Additional information can be found in Dates and Times .

Type: object
Default: null
vAxis.minorGridlines

An object with members to configure the minor gridlines on the vertical axis, similar to the vAxis.gridlines option.

Type: object
Default: null
vAxis.minorGridlines.color

The color of the vertical minor gridlines inside the chart area. Specify a valid HTML color string.

Type: string
Default: A blend of the gridline and background colors
vAxis.minorGridlines.count

The minorGridlines.count option is mostly deprecated, except for disabling minor gridlines by setting the count to 0. The number of minor gridlines depends on the interval between major gridlines (see vAxis.gridlines.interval) and the minimum required space (see vAxis.minorGridlines.minSpacing).

Type: number
Default: 1
vAxis.minorGridlines.interval

The minorGridlines.interval option is like the major gridlines interval option, but the interval that is chosen will always be an even divisor of the major gridline interval. The default interval for linear scales is [1, 1.5, 2, 2.5, 5] , and for log scales is [1, 2, 5] .

Type: number
Default: 1
vAxis.minorGridlines.minSpacing

The minimum required space, in pixels, between adjacent minor gridlines, and between minor and major gridlines. The default value is 1/2 the minSpacing of major gridlines for linear scales, and 1/5 the minSpacing for log scales.

Type: number
Default: computed
vAxis.minorGridlines.multiple

Same as for major gridlines.multiple .

Type: number
Default: 1
vAxis.minorGridlines.units

Overrides the default format for various aspects of date/datetime/timeofday data types when used with chart computed minorGridlines. Allows formatting for years, months, days, hours, minutes, seconds, and milliseconds.

General format is:

gridlines: {
  units: {
    years: {format: [/*format strings here*/]},
    months: {format: [/*format strings here*/]},
    days: {format: [/*format strings here*/]}
    hours: {format: [/*format strings here*/]}
    minutes: {format: [/*format strings here*/]}
    seconds: {format: [/*format strings here*/]},
    milliseconds: {format: [/*format strings here*/]},
  }
}
    

Additional information can be found in Dates and Times .

Type: object
Default: null
vAxis.logScale

If true, makes the vertical axis a logarithmic scale. Note: All values must be positive.

Type: boolean
Default: false
vAxis.scaleType

vAxis property that makes the vertical axis a logarithmic scale. Can be one of the following:

  • null - No logarithmic scaling is performed.
  • 'log' - Logarithmic scaling. Negative and zero values are not plotted. This option is the same as setting vAxis: { logscale: true } .
  • 'mirrorLog' - Logarithmic scaling in which negative and zero values are plotted. The plotted value of a negative number is the negative of the log of the absolute value. Values close to 0 are plotted on a linear scale.

This option is only supported for a continuous axis.

Type: string
Default: null
vAxis.textPosition

Position of the vertical axis text, relative to the chart area. Supported values: 'out', 'in', 'none'.

Type: string
Default: 'out'
vAxis.textStyle

An object that specifies the vertical axis text style. The object has this format:

{ color: <string>,
  fontName: <string>,
  fontSize: <number>,
  bold: <boolean>,
  italic: <boolean> }
    

The color can be any HTML color string, for example: 'red' or '#00cc00' . Also see fontName and fontSize .

Type: object
Default: {color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
vAxis.ticks

Replaces the automatically generated Y-axis ticks with the specified array. Each element of the array should be either a valid tick value (such as a number, date, datetime, or timeofday), or an object. If it's an object, it should have a v property for the tick value, and an optional f property containing the literal string to be displayed as the label.

The viewWindow will be automatically expanded to include the min and max ticks unless you specify a viewWindow.min or viewWindow.max to override.

Examples:

  • vAxis: { ticks: [5,10,15,20] }
  • vAxis: { ticks: [{v:32, f:'thirty two'}, {v:64, f:'sixty four'}] }
  • vAxis: { ticks: [new Date(2014,3,15), new Date(2013,5,15)] }
  • vAxis: { ticks: [16, {v:32, f:'thirty two'}, {v:64, f:'sixty four'}, 128] }
Type: Array of elements
Default: auto
vAxis.title

vAxis property that specifies a title for the vertical axis.

Type: string
Default: no title
vAxis.titleTextStyle

An object that specifies the vertical axis title text style. The object has this format:

{ color: <string>,
  fontName: <string>,
  fontSize: <number>,
  bold: <boolean>,
  italic: <boolean> }
  

The color can be any HTML color string, for example: 'red' or '#00cc00' . Also see fontName and fontSize .

Type: object
Default: {color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
vAxis.maxValue

Moves the max value of the vertical axis to the specified value; this will be upward in most charts. Ignored if this is set to a value smaller than the maximum y-value of the data. vAxis.viewWindow.max overrides this property.

Type: number
Default: automatic
vAxis.minValue

Moves the min value of the vertical axis to the specified value; this will be downward in most charts. Ignored if this is set to a value greater than the minimum y-value of the data. vAxis.viewWindow.min overrides this property.

Type: number
Default: null
vAxis.viewWindowMode

Specifies how to scale the vertical axis to render the values within the chart area. The following string values are supported:

  • 'pretty' - Scale the vertical values so that the maximum and minimum data values are rendered a bit inside the bottom and top of the chart area. The viewWindow is expanded to the nearest major gridline for numbers, or the nearest minor gridline for dates and times.
  • 'maximized' - Scale the vertical values so that the maximum and minimum data values touch the top and bottom of the chart area. This will cause vaxis.viewWindow.min and vaxis.viewWindow.max to be ignored.
  • 'explicit' - A deprecated option for specifying the top and bottom scale values of the chart area. (Deprecated because it's redundant with vaxis.viewWindow.min and vaxis.viewWindow.max . Data values outside these values will be cropped. You must specify a vAxis.viewWindow object describing the maximum and minimum values to show.
Type: string
Default: Equivalent to 'pretty', but vaxis.viewWindow.min and vaxis.viewWindow.max take precedence if used.
vAxis.viewWindow

Specifies the cropping range of the vertical axis.

Type: object
Default: null
vAxis.viewWindow.max

The maximum vertical data value to render.

Ignored when vAxis.viewWindowMode is 'pretty' or 'maximized'.

Type: number
Default: auto
vAxis.viewWindow.min

The minimum vertical data value to render.

Ignored when vAxis.viewWindowMode is 'pretty' or 'maximized'.

Type: number
Default: auto
width

Width of the chart, in pixels.

Type: number
Default: width of the containing element

Methods

Method
draw(data, options)

Draws the chart. The chart accepts further method calls only after the ready event is fired. Extended description .

Return Type: none
getAction(actionID)

Returns the tooltip action object with the requested actionID .

Return Type: object
getBoundingBox(id)

Returns an object containing the left, top, width, and height of chart element id . The format for id isn't yet documented (they're the return values of event handlers ), but here are some examples:

var cli = chart.getChartLayoutInterface();

Height of the chart area
cli.getBoundingBox('chartarea').height
Width of the third bar in the first series of a bar or column chart
cli.getBoundingBox('bar#0#2').width
Bounding box of the fifth wedge of a pie chart
cli.getBoundingBox('slice#4')
Bounding box of the chart data of a vertical (eg, column) chart:
cli.getBoundingBox('vAxis#0#gridline')
Bounding box of the chart data of a horizontal (eg, bar) chart:
cli.getBoundingBox('hAxis#0#gridline')

Values are relative to the container of the chart. Call this after the chart is drawn.

Return Type: object
getChartAreaBoundingBox()

Returns an object containing the left, top, width, and height of the chart content (ie, excluding labels and legend):

var cli = chart.getChartLayoutInterface();

cli.getChartAreaBoundingBox().left
cli.getChartAreaBoundingBox().top
cli.getChartAreaBoundingBox().height
cli.getChartAreaBoundingBox().width

Values are relative to the container of the chart. Call this after the chart is drawn.

Return Type: object
getChartLayoutInterface()

Returns an object containing information about the onscreen placement of the chart and its elements.

The following methods can be called on the returned object:

  • getBoundingBox
  • getChartAreaBoundingBox
  • getHAxisValue
  • getVAxisValue
  • getXLocation
  • getYLocation

Call this after the chart is drawn.

Return Type: object
getHAxisValue(xPosition, optional_axis_index)

Returns the horizontal data value at xPosition , which is a pixel offset from the chart container's left edge. Can be negative.

Example: chart.getChartLayoutInterface().getHAxisValue(400) .

Call this after the chart is drawn.

Return Type: number
getImageURI()

Returns the chart serialized as an image URI.

Call this after the chart is drawn.

See Printing PNG Charts .

Return Type: string
getSelection()

Returns an array of the selected chart entities. Selectable entities are bars, legend entries and categories. A bar corresponds to a cell in the data table, a legend entry to a column (row index is null), and a category to a row (column index is null). For this chart, only one entity can be selected at any given moment. Extended description .

Return Type: Array of selection elements
getVAxisValue(yPosition, optional_axis_index)

Returns the vertical data value at yPosition , which is a pixel offset down from the chart container's top edge. Can be negative.

Example: chart.getChartLayoutInterface().getVAxisValue(300) .

Call this after the chart is drawn.

Return Type: number
getXLocation(dataValue, optional_axis_index)

Returns the pixel x-coordinate of dataValue relative to the left edge of the chart's container.

Example: chart.getChartLayoutInterface().getXLocation(400) .

Call this after the chart is drawn.

Return Type: number
getYLocation(dataValue, optional_axis_index)

Returns the pixel y-coordinate of dataValue relative to the top edge of the chart's container.

Example: chart.getChartLayoutInterface().getYLocation(300) .

Call this after the chart is drawn.

Return Type: number
removeAction(actionID)

Removes the tooltip action with the requested actionID from the chart.

Return Type: none
setAction(action)

Sets a tooltip action to be executed when the user clicks on the action text.

The setAction method takes an object as its action parameter. This object should specify 3 properties: id — the ID of the action being set, text —the text that should appear in the tooltip for the action, and action — the function that should be run when a user clicks on the action text.

Any and all tooltip actions should be set prior to calling the chart's draw() method. Extended description .

Return Type: none
setSelection()

Selects the specified chart entities. Cancels any previous selection. Selectable entities are bars, legend entries and categories. A bar corresponds to a cell in the data table, a legend entry to a column (row index is null), and a category to a row (column index is null). For this chart, only one entity can be selected at a time. Extended description .

Return Type: none
clearChart()

Clears the chart, and releases all of its allocated resources.

Return Type: none

Events

For more information on how to use these events, see Basic Interactivity , Handling Events , and Firing Events .

Name
animationfinish

Fired when transition animation is complete.

Properties: none
click

Fired when the user clicks inside the chart. Can be used to identify when the title, data elements, legend entries, axes, gridlines, or labels are clicked.

Properties: targetID
error

Fired when an error occurs when attempting to render the chart.

Properties: id, message
legendpagination

Fired when the user clicks legend pagination arrows. Passes back the current legend zero-based page index and the total number of pages.

Properties: currentPageIndex, totalPages
onmouseover

Fired when the user mouses over a visual entity. Passes back the row and column indices of the corresponding data table element.

Properties: row, column
onmouseout

Fired when the user mouses away from a visual entity. Passes back the row and column indices of the corresponding data table element.

Properties: row, column
ready

The chart is ready for external method calls. If you want to interact with the chart, and call methods after you draw it, you should set up a listener for this event before you call the draw method, and call them only after the event was fired.

Properties: none
select

Fired when the user clicks a visual entity. To learn what has been selected, call getSelection() .

Properties: none

Data policy

All code and data are processed and rendered in the browser. No data is sent to any server.