我正在使用teechart
版本trait Foo { self =>
object InnerFoo {
def f: String = self.getClass.getName
}
}
trait Bar {
object InnerBar {
def f: String = this.getClass.getName
}
}
class FooImpl extends Foo
class BarImpl extends Bar
scala> (new FooImpl).InnerFoo.f // self still references the outer type Foo
res4: String = FooImpl
scala> (new BarImpl).InnerBar.f // this references the inner type InnerBar
res5: String = Bar$InnerBar$
在asp.net webform上使用.net framework 4.0
使用缩放工具时出现问题。
特别是这个设置:
TeeChartNET2014_4.1.2014.08120
设置正常,但在我缩放后,它会丢失。
保留所有设置(标记,标题,颜色,甚至角度)
Chart1.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Text;
- 设置为90),但即使我返回默认视图,这个肯定会丢失。
(缩放是根据teechart产品的程序组中的教程和示例准备的)
答案 0 :(得分:1)
我做了一个简单的例子,我使用了一个结合了TextLabels的缩放,这个例子在使用TeeChart for .Net build 4.1.2015.05140时没有问题。我附上了我使用过的代码:
protected void Page_Load(object sender, System.EventArgs e)
{
Steema.TeeChart.Chart ch1 = WebChart1.Chart;
System.IO.MemoryStream tmpChart = new System.IO.MemoryStream();
if (Session["ch1"] == null)
{
//setup Chart
if (ch1.Series.Count < 2)
{
ch1.Series.Add(new Steema.TeeChart.Styles.Line());
}
if (ch1.Tools.Count < 1)
{
ch1.Tools.Add(new Steema.TeeChart.Tools.ZoomTool());
}
ch1.Series[0].Color = Color.FromArgb(255, 199, 26);
ch1.Series[0].FillSampleValues(36);
ch1.Aspect.View3D = false;
((Steema.TeeChart.Tools.ZoomTool)ch1.Tools[0]).ZoomPenColor = Color.OliveDrab;
((Steema.TeeChart.Styles.Line)ch1.Series[0]).Pointer.Visible = true;
((Steema.TeeChart.Styles.Line)ch1.Series[0]).Pointer.Pen.Visible = false;
((Steema.TeeChart.Styles.Line)ch1.Series[0]).Pointer.HorizSize = 2;
((Steema.TeeChart.Styles.Line)ch1.Series[0]).Pointer.VertSize = 2;
//AddSeriesText
TextLabels(ch1);
//export Chart to a MemoryStream template
ch1.Export.Template.Save(tmpChart);
//save template to a Session variable
Session.Add("ch1", tmpChart);
}
else
{
//retrieve the session stored Chart
tmpChart = (System.IO.MemoryStream)Session["ch1"];
//set the Stream position to 0 as the last read/write
//will have moved the position to the end of the stream
tmpChart.Position = 0;
//import saved Chart
WebChart1.Chart.Import.Template.Load(tmpChart);
//check whether zoom request is being sent
CheckZoom(WebChart1);
}
}
private void CheckZoom(Steema.TeeChart.Web.WebChart wChart)
{
System.Collections.ArrayList zoomedState = (System.Collections.ArrayList)Session[wChart.ID + "Zoomed"];
zoomedState = ((Steema.TeeChart.Tools.ZoomTool)wChart.Chart.Tools[0]).SetCurrentZoom(Request,
zoomedState);
if (zoomedState == null)
Session.Remove(wChart.ID + "Zoomed");
else
Session.Add(wChart.ID + "Zoomed", zoomedState);
}
private void TextLabels(Steema.TeeChart.Chart chart)
{
chart.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Text;
for (int i = 0; i < chart.Series[0].Count; ++i)
{
chart.Series[0].Labels[i] = chart.Series[0].XValues[i].ToString();
}
chart.Axes.Bottom.Labels.Angle = 90;
}
然后,我已经使用上面的代码和TeechartFor.Net版本4.1.2014.08120测试了问题是否出现,我检测到放大该版本的问题。也许它与固定的错误id1201有关。因此,我建议您测试最新的TeeChartFor.Net版本,并检查问题是否也已修复。您可以从here下载试用版。