覆盖
本主题包含图表属性说明。 这些属性被处理作为可定制的。 其他属性的自定义则不被支持。
文件的格式:
<属性路径>: <图表库的默认值>
// 支持的值: large, medium, small, tinyvolumePaneSize: "large"// 在文本编辑器中可用的字体(即,在`文本`绘图工具属性对话框中)editorFontsList: ['Verdana', 'Courier New', 'Times New Roman', 'Arial']paneProperties.backgroundType: 'solid' // or 'gradient'paneProperties.background: "#ffffff"paneProperties.backgroundGradientStartColor: "#ffffff"paneProperties.backgroundGradientEndColor: "#ffffff"paneProperties.vertGridProperties.color: "#E6E6E6"paneProperties.vertGridProperties.style: LINESTYLE_SOLIDpaneProperties.horzGridProperties.color: "#E6E6E6"paneProperties.horzGridProperties.style: LINESTYLE_SOLIDpaneProperties.crossHairProperties.color: "#989898"paneProperties.crossHairProperties.width: 1paneProperties.crossHairProperties.style: LINESTYLE_DASHED// 边际(百分比)。 用于自动缩放。paneProperties.topMargin: 5paneProperties.bottomMargin: 5paneProperties.axisProperties.autoScale: truepaneProperties.axisProperties.lockScale: falsepaneProperties.axisProperties.percentage: falsepaneProperties.axisProperties.indexedTo100: falsepaneProperties.axisProperties.log: falsepaneProperties.axisProperties.alignLabels: truepaneProperties.axisProperties.isInverted: falsepaneProperties.legendProperties.showStudyArguments: truepaneProperties.legendProperties.showStudyTitles: truepaneProperties.legendProperties.showStudyValues: truepaneProperties.legendProperties.showSeriesTitle: truepaneProperties.legendProperties.showSeriesOHLC: truepaneProperties.legendProperties.showLegend: truepaneProperties.legendProperties.showBarChange: truepaneProperties.legendProperties.showOnlyPriceSource: truescalesProperties.backgroundColor : "#ffffff"scalesProperties.fontSize: 11scalesProperties.lineColor : "#555"scalesProperties.textColor : "#555"scalesProperties.scaleSeriesOnly : falsescalesProperties.showSeriesLastValue: truescalesProperties.showSeriesPrevCloseValue: falsescalesProperties.showStudyLastValue: falsescalesProperties.showStudyPlotLabels: falsescalesProperties.showSymbolLabels: falsescalesProperties.showCurrency: truescalesProperties.showUnit: truetimeScale.rightOffset: 5timezone: "Etc/UTC" #查看支持的时区列表(在Symbology页面中的timezone)的可用值// 数据列风格。 请参阅下面的支持的值// Bars = 0 #美国线// Candles = 1 #K线图// Line = 2 #线形图// Area = 3 #面积图// Heiken Ashi = 8 #平均K线图// Hollow Candles = 9 #空心K线图// Renko = 4 #转形图// Kagi = 5 #卡吉图// Point&Figure = 6 #点数图// Line Break = 7 #新价图mainSeriesProperties.style: 1mainSeriesProperties.showCountdown: truemainSeriesProperties.visible:truemainSeriesProperties.showPriceLine: truemainSeriesProperties.priceLineWidth: 1mainSeriesProperties.priceLineColor: ''mainSeriesProperties.showPrevClosePriceLine: falsemainSeriesProperties.prevClosePriceLineWidth: 1mainSeriesProperties.prevClosePriceLineColor: 'rgba( 85, 85, 85, 1)'mainSeriesProperties.lockScale: falsemainSeriesProperties.minTick: "default"mainSeriesProperties.minTick: minTick 值是 3 个值的字符串表示: pricescale, minmove, fractional (见下文)mainSeriesProperties.priceAxisProperties.autoScale:true (see #749)mainSeriesProperties.priceAxisProperties.autoScaleDisabled:false (see #749)mainSeriesProperties.priceAxisProperties.percentage:falsemainSeriesProperties.priceAxisProperties.percentageDisabled:falsemainSeriesProperties.priceAxisProperties.log:falsemainSeriesProperties.priceAxisProperties.logDisabled:false// 可能的值包括: description, ticker, ticker-and-descriptionmainSeriesProperties.statusViewStyle.symbolTextSource: 'description'symbolWatermarkProperties.color : "rgba(0, 0, 0, 0.00)"// 不同的图表类型默认值// K线图样式mainSeriesProperties.candleStyle.upColor: "#6ba583"mainSeriesProperties.candleStyle.downColor: "#d75442"mainSeriesProperties.candleStyle.drawWick: truemainSeriesProperties.candleStyle.drawBorder: truemainSeriesProperties.candleStyle.borderColor: "#378658"mainSeriesProperties.candleStyle.borderUpColor: "#225437"mainSeriesProperties.candleStyle.borderDownColor: "#5b1a13"mainSeriesProperties.candleStyle.wickUpColor: 'rgba( 115, 115, 117, 1)'mainSeriesProperties.candleStyle.wickDownColor: 'rgba( 115, 115, 117, 1)'mainSeriesProperties.candleStyle.barColorsOnPrevClose: false// 空心K线图样式mainSeriesProperties.hollowCandleStyle.upColor: "#6ba583"mainSeriesProperties.hollowCandleStyle.downColor: "#d75442"mainSeriesProperties.hollowCandleStyle.drawWick: truemainSeriesProperties.hollowCandleStyle.drawBorder: truemainSeriesProperties.hollowCandleStyle.borderColor: "#378658"mainSeriesProperties.hollowCandleStyle.borderUpColor: "#225437"mainSeriesProperties.hollowCandleStyle.borderDownColor: "#5b1a13"mainSeriesProperties.hollowCandleStyle.wickColor: "#737375"// 平均K线图样式mainSeriesProperties.haStyle.upColor: "#6ba583"mainSeriesProperties.haStyle.downColor: "#d75442"mainSeriesProperties.haStyle.drawWick: truemainSeriesProperties.haStyle.drawBorder: truemainSeriesProperties.haStyle.borderColor: "#378658"mainSeriesProperties.haStyle.borderUpColor: "#225437"mainSeriesProperties.haStyle.borderDownColor: "#5b1a13"mainSeriesProperties.haStyle.wickColor: "#737375"mainSeriesProperties.haStyle.barColorsOnPrevClose: false// 美国线样式mainSeriesProperties.barStyle.upColor: "#6ba583"mainSeriesProperties.barStyle.downColor: "#d75442"mainSeriesProperties.barStyle.barColorsOnPrevClose: falsemainSeriesProperties.barStyle.dontDrawOpen: false// 线形图样式mainSeriesProperties.lineStyle.color: "#2962FF"mainSeriesProperties.lineStyle.linestyle: LINESTYLE_SOLIDmainSeriesProperties.lineStyle.linewidth: 1mainSeriesProperties.lineStyle.priceSource: "close"// 面积图样式mainSeriesProperties.areaStyle.color1: "#606090"mainSeriesProperties.areaStyle.color2: "#2962FF"mainSeriesProperties.areaStyle.linecolor: "#2962FF"mainSeriesProperties.areaStyle.linestyle: LINESTYLE_SOLIDmainSeriesProperties.areaStyle.linewidth: 1mainSeriesProperties.areaStyle.priceSource: "close"// 基准线样式mainSeriesProperties.baselineStyle.baselineColor: "rgba( 117, 134, 150, 1)"mainSeriesProperties.baselineStyle.topFillColor1: "rgba( 83, 185, 135, 0.1)"mainSeriesProperties.baselineStyle.topFillColor2: "rgba( 83, 185, 135, 0.1)"mainSeriesProperties.baselineStyle.bottomFillColor1: "rgba( 235, 77, 92, 0.1)"mainSeriesProperties.baselineStyle.bottomFillColor2: "rgba( 235, 77, 92, 0.1)"mainSeriesProperties.baselineStyle.topLineColor: "rgba( 83, 185, 135, 1)"mainSeriesProperties.baselineStyle.bottomLineColor: "rgba( 235, 77, 92, 1)"mainSeriesProperties.baselineStyle.topLineWidth: 1mainSeriesProperties.baselineStyle.bottomLineWidth: 1mainSeriesProperties.baselineStyle.priceSource: "close"mainSeriesProperties.baselineStyle.transparency: 50mainSeriesProperties.baselineStyle.baseLevelPercentage: 50// Hi-Lo stylemainSeriesProperties.hiloStyle.color: "#2962FF"mainSeriesProperties.hiloStyle.showBorders: truemainSeriesProperties.hiloStyle.borderColor: "#2962FF"mainSeriesProperties.hiloStyle.showLabels: truemainSeriesProperties.hiloStyle.labelColor: "#2962FF"mainSeriesProperties.hiloStyle.fontFamily: 'Trebuchet MS'mainSeriesProperties.hiloStyle.fontSize: 7
LineStyles
LINESTYLE_SOLID = 0;LINESTYLE_DOTTED = 1;LINESTYLE_DASHED = 2;LINESTYLE_LARGE_DASHED = 3;
Mintick
查看此处 了解有关 minTick 值的更多信息。
下面是所有可能值的列表,表示为一个对象以获得更好的可读性:
{ priceScale: 1, minMove: 1, frac: false },{ priceScale: 10, minMove: 1, frac: false },{ priceScale: 100, minMove: 1, frac: false },{ priceScale: 1000, minMove: 1, frac: false },{ priceScale: 10000, minMove: 1, frac: false },{ priceScale: 100000, minMove: 1, frac: false },{ priceScale: 1000000, minMove: 1, frac: false },{ priceScale: 10000000, minMove: 1, frac: false },{ priceScale: 100000000, minMove: 1, frac: false },{ priceScale: 2, minMove: 1, frac: true },{ priceScale: 4, minMove: 1, frac: true },{ priceScale: 8, minMove: 1, frac: true },{ priceScale: 16, minMove: 1, frac: true },{ priceScale: 32, minMove: 1, frac: true },{ priceScale: 64, minMove: 1, frac: true },{ priceScale: 128, minMove: 1, frac: true },{ priceScale: 320, minMove: 1, frac: true },
除了上述值之外,默认 minTick 还有一个特殊值 - 'default'.
例子:
// reset minTick to defaulttvWidget.applyOverrides({ 'mainSeriesProperties.minTick': 'default' });// set series' minTick to { priceScale: 10000, minMove: 1, frac: false }tvWidget.applyOverrides({ 'mainSeriesProperties.minTick': '10000,1,false' });// set default minTick for overlay studies to { priceScale: 10000, minMove: 1, frac: false }tvWidget.applyStudiesOverrides({ 'overlay.minTick': '10000,1,false' });
