پرش به محتوا
منوی اصلی
منوی اصلی
انتقال به نوار کناری
نهفتن
ناوبری
صفحهٔ اصلی
تغییرات اخیر
مقالهٔ تصادفی
راهنما دربارهٔ مدیاویکی
صفحههای ویژه
جستجو
جستجو
ظاهر
ساخت حساب
ورود
ابزارهای شخصی
ساخت حساب
ورود
صفحههایی برای ویرایشگرانی که از سامانه خارج شدند
بیشتر بدانید
مشارکتها
بحث
در حال ویرایش
الگو:نمودار خشتی/خشت
الگو
بحث
فارسی
خواندن
ویرایش مبدأ
نمایش تاریخچه
ابزارها
ابزارها
انتقال به نوار کناری
نهفتن
کنشها
خواندن
ویرایش مبدأ
نمایش تاریخچه
عمومی
پیوندها به این صفحه
تغییرات مرتبط
اطلاعات صفحه
ظاهر
انتقال به نوار کناری
نهفتن
هشدار:
شما وارد نشدهاید. نشانی آیپی شما برای عموم قابل مشاهده خواهد بود اگر هر تغییری ایجاد کنید. اگر
وارد شوید
یا
یک حساب کاربری بسازید
، ویرایشهایتان به نام کاربریتان نسبت داده خواهد شد، همراه با مزایای دیگر.
بررسی ضدهرزنگاری. این قسمت را پر
نکنید
!
<noinclude><!-- -============================================================================= - Brick_chart/Bricks - Draw bricks for 1 count in {Brick_chart} numbers -============================================================================= -- (see NOTES at bottom) --> </noinclude>{{ #ifexpr:{{{count|0}}} > 0 |<!--show initial brick(s)--><div style=" background:{{{color|silver}}}; float:left; <!--see NOTE B2 & NOTE M3--> clear:{{#ifexpr: {{{offset|0}}} - {{{stride|10}}} * floor( ({{{offset|0}}})/{{{stride|10}}} ) > 0.001*{{{stride|10}}} |none|left}}; height:{{#expr:100/{{{stride|10}}} }}%; overflow:hidden; width:{{#expr: {{min|{{#expr: {{{stride|10}}} - ( {{{offset|0}}} - {{{stride|10}}} * floor( ( {{{offset|0}}} )/{{{stride|10}}} ) ) }} |{{{count|0}}}}} * 100/{{{stride|10}}} }}%; "> </div>{{ #ifexpr:{{{count|0}}} > {{min |{{#expr: {{{stride|10}}} - ( {{{offset|0}}} - {{{stride|10}}} * floor( ( {{{offset|0}}} )/{{{stride|10}}} ) ) }} |{{{count|0}}} }} |<!--show full-line bricks--><div style=" background:{{{color|grey}}}; float:left; clear:left; width:100%; overflow:hidden; height:{{#expr: floor( {{{count|0}}} - {{min |{{#expr: {{{stride|10}}} - ( {{{offset|0}}} - {{{stride|10}}} * floor( ( {{{offset|0}}} )/{{{stride|10}}} ) ) }} |{{{count|0}}}}} - ( {{{count|0}}}+{{{offset|0}}} - {{{stride|10}}} * floor( ( {{{count|0}}}+{{{offset|0}}} )/{{{stride|10}}} ) ) ) }}%<!-- -->"> </div>{{ #ifexpr: {{{count|0}}}+{{{offset|0}}} - {{{stride|10}}} * floor( ( {{{count|0}}}+{{{offset|0}}} )/{{{stride|10}}} ) > 0 |<!--show final bricks (if any)--><div style=" background:{{{color|silver}}}; float:left; clear:left; overflow:hidden; height:{{#expr:100/{{{stride|10}}} }}%; width:{{#expr: ( {{{count|0}}}+{{{offset|0}}} - {{{stride|10}}} * floor( ( {{{count|0}}}+{{{offset|0}}} )/{{{stride|10}}} ) ) * 100/{{{stride|10}}} }}%;<!-- -->"> </div> }} }} }}<noinclude><!-- ---------------------------------------------------------------------------- --NOTES -- -- NOTE A1: This template draws 1 to 3 line segments for: the initial bricks, -- whole lines of middle bricks, and the final bricks (if any). -- -- NOTE B2: The position of the bar line segments is set by "clear:none;" -- to append to the prior bar, or "clear:left;" for a new line segment -- as set by the first div-tag: <div style="float:left; clear:...;">. -- Other options, as "background:{{{color}}};" are in the same div-tag. -- -- NOTE M3: To allow decimal numbers, the calculations which used modulo -- function 'x mod n' were rewritten to use division and floor(x), as: -- {x} - {n}*floor( {x}/{n} ). Hence, '{offset} mod {stride}' became -- the formula: {{{offset|0}}} - {{{stride|10}}} * -- floor( ( {{{offset|0}}} )/{{{stride|10}}} ). -- Although mod was limited to integers, the formula allows any amounts -- as if: 16.45 mod 10 = 6.45, and brick bars scale for those numbers. -- -- NOTE S4: For a line segment to be visible, there must be a non-breaking -- space, where each div-tag contains an " ". However, the size -- of the line segment can be shorter than a space. -- ---------------------------------------------------------------------------- -HISTORY -17Aug2009 Created to display brick chart using div-tag line segments. -17Sep2012 Put HISTORY comments to log major changes (not typos). -17Sep2012 Put NOTES comments to explain template operation & limits. -17Sep2012 Indented markup to show 3 nested if-structures. -17Sep2012 Fixed overlapped bars by full use of div-tag "overflow:hidden;". -17Sep2012 Added "overflow:hidden;" to 3rd line segment to match 1 & 2. -18Sep2012 Allowed decimals by replacing mod as: {c} - 10*floor( {c}/10 ). --> The '''[[Template:Brick_chart/Bricks]]''' draws bricks for {{tl|Brick chart}}. The bricks are displayed as 1, 2 or 3 bar line segments, depending on the offset and count numbers. Parameters: :* count - the number (or decimal) to represent by bar line segments :* offset - the sum of prior count numbers (can be: 2+5+7.8, etc.) :* stride - width of lines (in number units) in the brick chart (default: 10) :* color - a web-color name or number (see all: [[Web colors]]). The height of a bar line segment is 100/{stride}% with default as 10%. The default offset=0, and the full effects of the template can only be seen when run multiple times, with the bar line segments displayed together, as when invoked several times from [[Template:Brick_chart]]. [[رده:الگو:قالببندی و عملکرد ویکیپدیا]] </noinclude>
خلاصه:
لطفاً توجه داشته باشید که همهٔ مشارکتها در ایرانپدیا ممکن است توسط دیگر مشارکتکنندگان تغییر یابند، ویرایش یا حذف شوند. اگر نمیخواهید نوشتههایتان بیرحمانه ویرایش شوند؛ بنابراین، آنها را اینجا ارائه نکنید.
شما همچنین به ما تعهد میکنید که خودتان این را نوشتهاید یا آن را از یک منبع با مالکیت عمومی یا مشابه آزاد آن برداشتهاید (
ایرانپدیا:حق تکثیر
را برای جزئیات بیشتر ببینید).
کارهای دارای حق تکثیر را بدون اجازه ارائه نکنید!
لغو
راهنمای ویرایش
(در پنجرهٔ تازه باز میشود)
پیشنمایش صفحه با این الگو
الگوی بهکاررفته در این صفحه:
الگو:Tl
(
ویرایش
)
جستجو
جستجو
در حال ویرایش
الگو:نمودار خشتی/خشت
افزودن مبحث