সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
পাঠ্য শৈলী
একটি পাঠ্য শৈলী কনফিগারেশন অবজেক্ট। শিরোনাম, অনুভূমিক অক্ষ, উল্লম্ব অক্ষ, কিংবদন্তি এবং টুলটিপের মতো উপাদানগুলির জন্য পাঠ্য শৈলী কনফিগার করতে চার্ট বিকল্পগুলিতে ব্যবহৃত হয়।
// This example creates a chart specifying different text styles for the title// and axes.constsampleData=Charts.newDataTable().addColumn(Charts.ColumnType.STRING,'Seasons').addColumn(Charts.ColumnType.NUMBER,'Rainy Days').addRow(['Winter',5]).addRow(['Spring',12]).addRow(['Summer',8]).addRow(['Fall',8]).build();consttitleTextStyleBuilder=Charts.newTextStyle().setColor('#0000FF').setFontSize(26).setFontName('Ariel');constaxisTextStyleBuilder=Charts.newTextStyle().setColor('#3A3A3A').setFontSize(20).setFontName('Ariel');consttitleTextStyle=titleTextStyleBuilder.build();constaxisTextStyle=axisTextStyleBuilder.build();constchart=Charts.newLineChart().setTitleTextStyle(titleTextStyle).setXAxisTitleTextStyle(axisTextStyle).setYAxisTitleTextStyle(axisTextStyle).setTitle('Rainy Days Per Season').setXAxisTitle('Season').setYAxisTitle('Number of Rainy Days').setDataTable(sampleData).build();
// Creates a new text style that uses blue text and logs the color.consttextStyle=Charts.newTextStyle().setColor('blue').build();Logger.log(textStyle.getColor());
প্রত্যাবর্তন
String — রঙের জন্য CSS মান (যেমন "blue" বা "#00f" )।
get Font Name()
পাঠ্য শৈলীর ফন্টের নাম পায়।
// Creates a new text style that uses Ariel font and logs the font name.consttextStyle=Charts.newTextStyle().setFontName('Ariel').build();Logger.log(textStyle.getFontName());
প্রত্যাবর্তন
String - ফন্টের নাম।
get Font Size()
পাঠ্য শৈলীর ফন্টের আকার পায়।
// Creates a new text style that uses 18 pixel font size and logs the font size.consttextStyle=Charts.newTextStyle().setFontSize(18).build();Logger.log(textStyle.getFontSize());
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003e\u003ccode\u003eTextStyle\u003c/code\u003e objects configure the visual appearance of text elements in charts, such as titles, axes, legends, and tooltips.\u003c/p\u003e\n"],["\u003cp\u003eYou can customize text color, font name, and font size using methods like \u003ccode\u003esetColor()\u003c/code\u003e, \u003ccode\u003esetFontName()\u003c/code\u003e, and \u003ccode\u003esetFontSize()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTextStyle\u003c/code\u003e object is used within chart options to apply these styles to specific chart elements.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetColor()\u003c/code\u003e, \u003ccode\u003egetFontName()\u003c/code\u003e, and \u003ccode\u003egetFontSize()\u003c/code\u003e methods retrieve the current style settings of a \u003ccode\u003eTextStyle\u003c/code\u003e object.\u003c/p\u003e\n"]]],[],null,["TextStyle\n\nA text style configuration object. Used in charts options to configure text style for elements\nthat accepts it, such as title, horizontal axis, vertical axis, legend and tooltip.\n\n```javascript\n// This example creates a chart specifying different text styles for the title\n// and axes.\nconst sampleData = Charts.newDataTable()\n .addColumn(Charts.ColumnType.STRING, 'Seasons')\n .addColumn(Charts.ColumnType.NUMBER, 'Rainy Days')\n .addRow(['Winter', 5])\n .addRow(['Spring', 12])\n .addRow(['Summer', 8])\n .addRow(['Fall', 8])\n .build();\n\nconst titleTextStyleBuilder =\n Charts.newTextStyle().setColor('#0000FF').setFontSize(26).setFontName(\n 'Ariel');\nconst axisTextStyleBuilder =\n Charts.newTextStyle().setColor('#3A3A3A').setFontSize(20).setFontName(\n 'Ariel');\nconst titleTextStyle = titleTextStyleBuilder.build();\nconst axisTextStyle = axisTextStyleBuilder.build();\n\nconst chart = Charts.newLineChart()\n .setTitleTextStyle(titleTextStyle)\n .setXAxisTitleTextStyle(axisTextStyle)\n .setYAxisTitleTextStyle(axisTextStyle)\n .setTitle('Rainy Days Per Season')\n .setXAxisTitle('Season')\n .setYAxisTitle('Number of Rainy Days')\n .setDataTable(sampleData)\n .build();\n``` \n\nMethods\n\n| Method | Return type | Brief description |\n|---------------------------------|-------------|---------------------------------------|\n| [getColor()](#getColor()) | `String` | Gets the color of the text style. |\n| [getFontName()](#getFontName()) | `String` | Gets the font name of the text style. |\n| [getFontSize()](#getFontSize()) | `Number` | Gets the font size of the text style. |\n\nDetailed documentation \n\n`get``Color()` \nGets the color of the text style.\n\n```javascript\n// Creates a new text style that uses blue text and logs the color.\nconst textStyle = Charts.newTextStyle().setColor('blue').build();\nLogger.log(textStyle.getColor());\n```\n\nReturn\n\n\n`String` --- The CSS value for the color (such as `\"blue\"` or `\"#00f\"`).\n\n*** ** * ** ***\n\n`get``Font``Name()` \nGets the font name of the text style.\n\n```javascript\n// Creates a new text style that uses Ariel font and logs the font name.\nconst textStyle = Charts.newTextStyle().setFontName('Ariel').build();\nLogger.log(textStyle.getFontName());\n```\n\nReturn\n\n\n`String` --- The font name.\n\n*** ** * ** ***\n\n`get``Font``Size()` \nGets the font size of the text style.\n\n```javascript\n// Creates a new text style that uses 18 pixel font size and logs the font size.\nconst textStyle = Charts.newTextStyle().setFontSize(18).build();\nLogger.log(textStyle.getFontSize());\n```\n\nReturn\n\n\n`Number` --- The font size in pixels."]]