05 August 2015

BarLineScatterCandleChartDataSet


public class BarLineScatterCandleChartDataSet: ChartDataSet
{
    //  高亮颜色
    public var highlightColor = UIColor(red: 255.0/255.0, green: 187.0/255.0, blue: 115.0/255.0, alpha: 1.0)
    // 高亮宽度
    public var highlightLineWidth = CGFloat(0.5)
    // 高亮虚线
    public var highlightLineDashPhase = CGFloat(0.0)
    // 虚线长度集合
    public var highlightLineDashLengths: [CGFloat]?

<span class="c1">// MARK: NSCopying</span>

<span class="kd">public</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">copyWithZone</span><span class="p">(</span><span class="nv">zone</span><span class="p">:</span> <span class="kt">NSZone</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">AnyObject</span>
<span class="p">{</span>
    <span class="k">var</span> <span class="nv">copy</span> <span class="o">=</span> <span class="k">super</span><span class="o">.</span><span class="nf">copyWithZone</span><span class="p">(</span><span class="n">zone</span><span class="p">)</span> <span class="k">as!</span> <span class="kt">BarLineScatterCandleChartDataSet</span>
    <span class="n">copy</span><span class="o">.</span><span class="n">highlightColor</span> <span class="o">=</span> <span class="n">highlightColor</span>
    <span class="n">copy</span><span class="o">.</span><span class="n">highlightLineWidth</span> <span class="o">=</span> <span class="n">highlightLineWidth</span>
    <span class="n">copy</span><span class="o">.</span><span class="n">highlightLineDashPhase</span> <span class="o">=</span> <span class="n">highlightLineDashPhase</span>
    <span class="n">copy</span><span class="o">.</span><span class="n">highlightLineDashLengths</span> <span class="o">=</span> <span class="n">highlightLineDashLengths</span>
    <span class="k">return</span> <span class="n">copy</span>
<span class="p">}</span>

}

BarLineScatterCandleChartData


public class BarLineScatterCandleChartData: ChartData
{
    public override init()
    {
        super.init()
    }

<span class="kd">public</span> <span class="k">override</span> <span class="nf">init</span><span class="p">(</span><span class="nv">xVals</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">?]?,</span> <span class="nv">dataSets</span><span class="p">:</span> <span class="p">[</span><span class="kt">ChartDataSet</span><span class="p">]?)</span>
<span class="p">{</span>
    <span class="k">super</span><span class="o">.</span><span class="nf">init</span><span class="p">(</span><span class="nv">xVals</span><span class="p">:</span> <span class="n">xVals</span><span class="p">,</span> <span class="nv">dataSets</span><span class="p">:</span> <span class="n">dataSets</span><span class="p">)</span>
<span class="p">}</span>

<span class="kd">public</span> <span class="k">override</span> <span class="nf">init</span><span class="p">(</span><span class="nv">xVals</span><span class="p">:</span> <span class="p">[</span><span class="kt">NSObject</span><span class="p">]?,</span> <span class="nv">dataSets</span><span class="p">:</span> <span class="p">[</span><span class="kt">ChartDataSet</span><span class="p">]?)</span>
<span class="p">{</span>
    <span class="k">super</span><span class="o">.</span><span class="nf">init</span><span class="p">(</span><span class="nv">xVals</span><span class="p">:</span> <span class="n">xVals</span><span class="p">,</span> <span class="nv">dataSets</span><span class="p">:</span> <span class="n">dataSets</span><span class="p">)</span>
<span class="p">}</span>

}



blog comments powered by Disqus