Jump to content
JChartFX Community

StatementSolutions

Members
  • Content count

    60
  • Joined

  • Last visited

  • Days Won

    1

StatementSolutions last won the day on October 12 2015

StatementSolutions had the most liked content!

Community Reputation

1 Neutral

About StatementSolutions

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

388 profile views
  1. Size of chart

    when I just increase the width of the window with the pie chart there is not as much extra spaces on the top or bottom but the left and right side of the chart has aloty of extra spaces which I assume that is expected but if i increase the width and height of the window with the chart the top and bottom does not have as much extra space as the left and right side of the chart.
  2. Size of chart

    I commented out the 3d and slicing. When the window size increases to a certain size the charts height is ok withouit extra spaces but the width has extra spaces on the left and right of the pie chart chart. The top and bottom of the chart does not have as much extra space.. If i decrease the window size the chart renders but than there is excess space around the chart. code: @model ePortfolio.Models.WidgetViewModel @using System.Web.Script.Serialization; <div class="widget-head" style="display:inline-block;overflow:no-content;height:10%;width:100%;"> <div class="widget-title text-center" style="padding-top:10px;"><label>@Model.Widget.Title</label></div> <div id="id-refresh-@Model.Widget.Id" class="wdgbkg"> </div> </div> <div class="widget-body" style="display: inline-block;overflow: visible;height:100%;width:100%"> <div id="ChartDiv" style="width:100%;height:90%;position:absolute"></div> </div> <script type="text/javascript" language="javascript"> var chart@(Model.Widget.Id); function LoadPieChart() { chart@(Model.Widget.Id) = new cfx.Chart(); chart@(Model.Widget.Id).setGallery(cfx.Gallery.Pie); chart@(Model.Widget.Id).getAllSeries().getPointLabels().setVisible(true); //var pieAttr = chart@(Model.Widget.Id).getAllSeries().getGalleryAttributes(); var pieAttr = chart@(Model.Widget.Id).getGalleryAttributes(); //pieAttr.setSliceSeparation(10); pieAttr.setLabelsInside(true); //pieAttr.setExplodingMode(cfx.ExplodingMode.First); //chart@(Model.Widget.Id).getAllSeries().getPointLabels().setFormat("%l %p%%"); chart@(Model.Widget.Id).getAllSeries().getPointLabels().setFormat("%p%%"); var str = @Html.Raw(Json.Encode(ViewData["Asset Allocations Chart"])); chart@(Model.Widget.Id).getAxisY().getDataFormat().setDecimals(2); //chart@(Model.Widget.Id).getView3D().setEnabled(true); chart@(Model.Widget.Id).setDataSource(str); var data = chart@(Model.Widget.Id).getData(); data.setSeries(1); data.setPoints(10); chart@(Model.Widget.Id).getToolTips().setEnabled(true); chart@(Model.Widget.Id).getToolTips().setAlignment("near"); chart@(Model.Widget.Id).getToolTips().setFormat("%l%"); chart@(Model.Widget.Id).getLegendBox().setVisible(false); @*chart@(Model.Widget.Id).getLegendBox().setWidth(175); chart@(Model.Widget.Id).getLegendBox().setDock(cfx.DockArea.Right); chart@(Model.Widget.Id).getLegendBox().setContentLayout(cfx.ContentLayout.Near);*@ chart@(Model.Widget.Id).getPlotAreaMargin().setTop(1); chart@(Model.Widget.Id).getPlotAreaMargin().setBottom(1); chart@(Model.Widget.Id).getPlotAreaMargin().setRight(1); chart@(Model.Widget.Id).getPlotAreaMargin().setLeft(1); var divHolder = document.getElementById('ChartDiv'); chart@(Model.Widget.Id).create(divHolder); } $(function() { LoadPieChart(); }); function ResizeChart() { if (chart@(Model.Widget.Id) != null) chart@(Model.Widget.Id).doUpdate(true); }; </script> <style> svg { position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; bottom: 0; } rect { position: absolute; width: 100%; height: 100%; left:0; right:0; top:0; bottom:0; } </style>
  3. Size of chart

    It seems as the window of the chart is increased in size the chart increases but also there is more space especially to the left and right of the pie chart code: <!DOCTYPE html> <html> <head> <script type="text/javascript" src="jchartfx.system.js"> </script> <script type="text/javascript" src="jchartfx.coreVector.js"> </script> <script type="text/javascript" src="jchartfx.coreVector3d.js"> </script> </head> <body onload="onPageLoad()" onresize="onPageResize()"> <div id="myDiv" style="width:100%;height:100%;position:absolute"></div> <script language="javascript"> var chart1 = null; function onPageLoad() { chart1 = new cfx.Chart(); chart1.setGallery(cfx.Gallery.Pie); chart1.getAllSeries().getPointLabels().setVisible(true); //var pieAttr = chart1.getAllSeries().getGalleryAttributes(); var pieAttr = chart1.getGalleryAttributes(); pieAttr.setSliceSeparation(20); pieAttr.setLabelsInside(true); pieAttr.setExplodingMode(cfx.ExplodingMode.First); chart1.getAllSeries().getPointLabels().setFormat("%p%%"); chart1.getAxisY().getDataFormat().setDecimals(2); chart1.getView3D().setEnabled(true); chart1.setDataSource([10,12,14,18]); chart1.getLegendBox().setVisible(false); chart1.getPlotAreaMargin().setTop(1); chart1.getPlotAreaMargin().setBottom(1); chart1.getPlotAreaMargin().setRight(1); chart1.getPlotAreaMargin().setLeft(1); chart1.create("myDiv"); }; function onPageResize() { if (chart1 != null) chart1.doUpdate(true); } </script> </body> </html>
  4. Size of chart

    As the window with the chart is increased there will be more space around the chart. If the chart is as small as possible base on the window the space around the chart is not as much. I'm not sure if the watermark may cause more space around the chart as the window grows code: <!DOCTYPE html> <html> <head> <script type="text/javascript" src="jchartfx.system.js"> </script> <script type="text/javascript" src="jchartfx.coreVector.js"> </script> <script type="text/javascript" src="jchartfx.coreVector3d.js"> </script> </head> <body onload="onPageLoad()" onresize="onPageResize()"> <div id="myDiv" style="width:100%;height:100%;position:absolute"></div> <script language="javascript"> var chart1 = null; function onPageLoad() { chart1 = new cfx.Chart(); chart1.setGallery(cfx.Gallery.Pie); chart1.getAllSeries().getPointLabels().setVisible(true); //var pieAttr = chart1.getAllSeries().getGalleryAttributes(); var pieAttr = chart1.getGalleryAttributes(); pieAttr.setSliceSeparation(20); pieAttr.setLabelsInside(true); pieAttr.setExplodingMode(cfx.ExplodingMode.First); chart1.getAllSeries().getPointLabels().setFormat("%p%%"); chart1.getAxisY().getDataFormat().setDecimals(2); chart1.getView3D().setEnabled(true); chart1.setDataSource([10,12,14,18]); chart1.getLegendBox().setVisible(false); chart1.getPlotAreaMargin().setTop(1); chart1.getPlotAreaMargin().setBottom(1); chart1.getPlotAreaMargin().setRight(1); chart1.getPlotAreaMargin().setLeft(1); chart1.create("myDiv"); }; function onPageResize() { if (chart1 != null) chart1.doUpdate(true); } </script> </body> </html>
  5. Size of chart

    I palce a fixed width and height onto the div chart as indicated below in bold and now the widget with this pie chart renders but when I resize nothing happens to the chart. @model ePortfolio.Models.WidgetViewModel @using System.Web.Script.Serialization; <div class="widget-head" style="display:inline-block;overflow:no-content;height:10%;width:100%;"> <div class="widget-title text-center" style="padding-top:10px;"><label>@Model.Widget.Title</label></div> <div id="id-refresh-@Model.Widget.Id" class="wdgbkg"> </div> </div> <div class="widget-body" style="display: inline-block;overflow: visible;height:100%;width:100%;"> <div class="widget-content" id="ChartDiv" style="display: inline-block;overflow: visible;height:400px;width:400px;"></div> </div> <script type="text/javascript" language="javascript"> var chart@(Model.Widget.Id); function LoadPieChart() { chart@(Model.Widget.Id) = new cfx.Chart(); chart@(Model.Widget.Id).setGallery(cfx.Gallery.Pie); chart@(Model.Widget.Id).getAllSeries().getPointLabels().setVisible(true); //var pieAttr = chart@(Model.Widget.Id).getAllSeries().getGalleryAttributes(); var pieAttr = chart@(Model.Widget.Id).getGalleryAttributes(); pieAttr.setSliceSeparation(40); pieAttr.setLabelsInside(true); pieAttr.setExplodingMode(cfx.ExplodingMode.First); //chart@(Model.Widget.Id).getAllSeries().getPointLabels().setFormat("%l %p%%"); chart@(Model.Widget.Id).getAllSeries().getPointLabels().setFormat("%p%%"); var str = @Html.Raw(Json.Encode(ViewData["Asset Allocations Chart"])); chart@(Model.Widget.Id).getAxisY().getDataFormat().setDecimals(2); chart@(Model.Widget.Id).getView3D().setEnabled(true); chart@(Model.Widget.Id).setDataSource(str); var data = chart@(Model.Widget.Id).getData(); data.setSeries(1); data.setPoints(10); chart@(Model.Widget.Id).getToolTips().setEnabled(true); chart@(Model.Widget.Id).getToolTips().setAlignment("near"); chart@(Model.Widget.Id).getToolTips().setFormat("%l%"); chart@(Model.Widget.Id).getLegendBox().setVisible(false); @*chart@(Model.Widget.Id).getLegendBox().setWidth(175); chart@(Model.Widget.Id).getLegendBox().setDock(cfx.DockArea.Right); chart@(Model.Widget.Id).getLegendBox().setContentLayout(cfx.ContentLayout.Near);*@ chart@(Model.Widget.Id).getPlotAreaMargin().setTop(1); chart@(Model.Widget.Id).getPlotAreaMargin().setBottom(1); chart@(Model.Widget.Id).getPlotAreaMargin().setRight(1); chart@(Model.Widget.Id).getPlotAreaMargin().setLeft(1); var divHolder = document.getElementById('ChartDiv'); chart@(Model.Widget.Id).create(divHolder); } $(function() { LoadPieChart(); }); function ResizeChart() { if (chart@(Model.Widget.Id) != null) chart@(Model.Widget.Id).doUpdate(true); }; </script> <style> svg { position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; bottom: 0; } rect { position: absolute; width: 100%; height: 100%; left:0; right:0; top:0; bottom:0; } </style>
  6. Size of chart

    1) Does the chart generate the pie slices of an appropriate size when using a fixed div size, e.g. 400x400 I did modify the div using a fix size of 400x400. The pie chart slices does render and resizes when I resize the window. As the window with the jChartFx gets bigger there is more blank space around the pie chart as the pie chart grows. @model ePortfolio.Models.WidgetViewModel @using System.Web.Script.Serialization; <div class="widget-head" style="display:inline-block;overflow:no-content;height:10%;width:100%;"> <div class="widget-title text-center" style="padding-top:10px;"><label>@Model.Widget.Title</label></div> <div id="id-refresh-@Model.Widget.Id" class="wdgbkg"> </div> </div> <div class="widget-body" style="display: inline-block;overflow: visible;height:400px;width:400px;"> <div class="widget-content" id="ChartDiv" ></div> </div> <script type="text/javascript" language="javascript"> var chart@(Model.Widget.Id); function LoadPieChart() { chart@(Model.Widget.Id) = new cfx.Chart(); chart@(Model.Widget.Id).setGallery(cfx.Gallery.Pie); chart@(Model.Widget.Id).getAllSeries().getPointLabels().setVisible(true); //var pieAttr = chart@(Model.Widget.Id).getAllSeries().getGalleryAttributes(); var pieAttr = chart@(Model.Widget.Id).getGalleryAttributes(); pieAttr.setSliceSeparation(40); pieAttr.setLabelsInside(true); pieAttr.setExplodingMode(cfx.ExplodingMode.First); //chart@(Model.Widget.Id).getAllSeries().getPointLabels().setFormat("%l %p%%"); chart@(Model.Widget.Id).getAllSeries().getPointLabels().setFormat("%p%%"); var str = @Html.Raw(Json.Encode(ViewData["Asset Allocations Chart"])); chart@(Model.Widget.Id).getAxisY().getDataFormat().setDecimals(2); chart@(Model.Widget.Id).getView3D().setEnabled(true); chart@(Model.Widget.Id).setDataSource(str); var data = chart@(Model.Widget.Id).getData(); data.setSeries(1); data.setPoints(10); chart@(Model.Widget.Id).getToolTips().setEnabled(true); chart@(Model.Widget.Id).getToolTips().setAlignment("near"); chart@(Model.Widget.Id).getToolTips().setFormat("%l%"); chart@(Model.Widget.Id).getLegendBox().setVisible(false); @*chart@(Model.Widget.Id).getLegendBox().setWidth(175); chart@(Model.Widget.Id).getLegendBox().setDock(cfx.DockArea.Right); chart@(Model.Widget.Id).getLegendBox().setContentLayout(cfx.ContentLayout.Near);*@ chart@(Model.Widget.Id).getPlotAreaMargin().setTop(1); chart@(Model.Widget.Id).getPlotAreaMargin().setBottom(1); chart@(Model.Widget.Id).getPlotAreaMargin().setRight(1); chart@(Model.Widget.Id).getPlotAreaMargin().setLeft(1); var divHolder = document.getElementById('ChartDiv'); chart@(Model.Widget.Id).create(divHolder); } $(function() { LoadPieChart(); }); function ResizeChart() { if (chart@(Model.Widget.Id) != null) chart@(Model.Widget.Id).doUpdate(true); }; </script> <style> svg { position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; bottom: 0; } rect { position: absolute; width: 100%; height: 100%; left:0; right:0; top:0; bottom:0; } </style> 2) Does the chart reacts to changes in div size The chart does react as the window with the above changes
  7. Size of chart

    How do I make the 'svg' and 'rect' obect width/height 100% with no margin or very low margin so that its responsive and take more of the empty space surrounding the pie chart. this svg and rect object is created via jChartFx.
  8. Size of chart

    I fixed the js error. That was not the cause for the chart not fiolling out more of the white space. When I debug the chart i noticed the following is being created on the jchartfx: <svg id="chart" class="jchartfx" width="518" height="297" xmlns="http://www.w3.org/2000/svg"xmlns:sfx="http://www.softwarefx.com/ns" xmlns:xlink="http://www.w3.org/1999/xlink"> <rect class="Border" pointer-events="none" x="0.5" y="0.5" width="517" height="296"> How can I increase the width/height for both 'svg' and 'rect' that is rendered via jChartFx?
  9. Pie Chart Size

    as indicated from a prior post if you place a percentage amount as a width and height of the div where the jchartfx to be rendered it throws an error on a jchartfx javacsript. your sample: <div id="myDiv" style="width:600px;height:400px;display:inline-block"></div> my sample: <div id="myDiv" style="width:100%;height:90%;display:inline-block"></div> javscript error message htornw when using a % cvalue as height or widht on the div: Error: Invalid negative value for <svg> attyribute height="-7". r._Soz @jchartfx.system.js:150
  10. Pie Chart Size

    From your example you use finite amount to determine width and height of the chart. <div id="myDiv" style="width:600px;height:400px;display:inline-block"></div> From a CSS we are using percentage to determine width and height of the chart to be created. #ChartDiv { display: inline-block; overflow: visible; height: 90%; width:100%; background: #eeeeee; } <div class="widget-content" id="ChartDiv"></div> This web page with the jchartfx pie chart is a widget with lots of jaavscript to make the window can be dragged-and-dropped and resizabe. As ithe window is resized the jchart pie chart should be responsice enough and resize proportion to the resized page without so much white space around the jchartfx pie chart. I would need to include quite a few jaavscript, and css that makes this web page drag-and-drop and resizeable. ChartData2.xml
  11. Size of chart

    It seems that the jChartFx doex not like % value for height or width. The percentage value throws this error: I used % values for width and heoght so that as the widget is resized the jChartFX chart is resized. I still don't know how to increase the size of the chart so that it takes more of the white space from the page. Error: Invalid negative value for <svg> attribute height="-7" r._Sos @jchartfx.system.js:150 CSS: display: inline-block; overflow: visible; height: 90%; width:100%; background: #eeeeee;
  12. Size of chart

    I also noticed there was a jchartfx JS error. I am not sure if this may be causing the pie chart to not fill out more of the white space on the page. Error: Invalid negative value for <svg> attribute height="-7" r._Sos @jchartfx.system.js:150
  13. Size of chart

    I did set the margin to 0 as you can see on below code. I want to increase/decrase the chart as the widget seize increase/decrease. I am having problems trying to include an image on the pie chart to show you the white space around the pie chart. It says you are not allowed to use that image extension on this comunity'. I noticed the jChartFx is rendered on a 'svg' with the width and height info. Please advise Code: @model ePortfolio.Models.WidgetViewModel @using System.Web.Script.Serialization; <div class="widget-head" style="display:block;overflow:no-content;height:10%;width:100%;"> <div class="widget-title text-center" style="padding-top:10px;"><label>@Model.Widget.Title</label></div> <div id="id-refresh-@Model.Widget.Id" class="wdgbkg"> </div> </div> <div class="widget-body" style="display: inline-block;overflow: visible;height:100%;width:100%;"> <div class="widget-content" id="ChartDiv" style="display: inline-block; overflow: visible;height: 90%;width:100%; "></div> </div> <script type="text/javascript" language="javascript"> var chart@(Model.Widget.Id); function LoadPieChart() { chart@(Model.Widget.Id) = new cfx.Chart(); chart@(Model.Widget.Id).setGallery(cfx.Gallery.Pie); chart@(Model.Widget.Id).getAllSeries().getPointLabels().setVisible(true); var pieAttr = chart@(Model.Widget.Id).getAllSeries().getGalleryAttributes(); pieAttr.setSliceSeparation(50); pieAttr.setLabelsInside(false); pieAttr.setExplodingMode(cfx.ExplodingMode.First); //chart@(Model.Widget.Id).getAllSeries().getPointLabels().setFormat("%l %p%%"); chart@(Model.Widget.Id).getAllSeries().getPointLabels().setFormat("%p%%"); var str = @Html.Raw(Json.Encode(ViewData["Asset Allocations Chart"])); chart@(Model.Widget.Id).getAxisY().getDataFormat().setDecimals(2); chart@(Model.Widget.Id).getView3D().setEnabled(true); chart@(Model.Widget.Id).setDataSource(str); var data = chart@(Model.Widget.Id).getData(); data.setSeries(1); data.setPoints(10); chart@(Model.Widget.Id).getToolTips().setEnabled(true); chart@(Model.Widget.Id).getToolTips().setAlignment("near"); chart@(Model.Widget.Id).getToolTips().setFormat("%l%"); chart@(Model.Widget.Id).getLegendBox().setVisible(false); @*chart@(Model.Widget.Id).getLegendBox().setWidth(175); chart@(Model.Widget.Id).getLegendBox().setDock(cfx.DockArea.Right); chart@(Model.Widget.Id).getLegendBox().setContentLayout(cfx.ContentLayout.Near);*@ chart@(Model.Widget.Id).getPlotAreaMargin().setTop(0); chart@(Model.Widget.Id).getPlotAreaMargin().setBottom(0); chart@(Model.Widget.Id).getPlotAreaMargin().setRight(0); chart@(Model.Widget.Id).getPlotAreaMargin().setLeft(0); var divHolder = document.getElementById('ChartDiv'); chart@(Model.Widget.Id).create(divHolder); } $(function() { LoadPieChart(); }); function ResizeChart() { if (chart@(Model.Widget.Id) != null) chart@(Model.Widget.Id).doUpdate(true); }; </script>
  14. Pie Chart Size

    My jCharFx pie chart is kinda small. There is alot of empty space around the chart. I am trying to expand the jChartFx pie chart to take more of the empty space of the page. Below is my code. code: @model ePortfolio.Models.WidgetViewModel @using System.Web.Script.Serialization; <div class="widget-head" style="display:block;overflow:no-content;height:10%;width:100%;"> <div class="widget-title text-center" style="padding-top:10px;"><label>@Model.Widget.Title</label></div> <div id="id-refresh-@Model.Widget.Id" class="wdgbkg"> </div> </div> <div class="widget-body" style="display: inline-block;overflow: visible;height:100%;width:100%;"> <div class="widget-content" id="ChartDiv" style="display: inline-block; overflow: visible;height:90%;width:100%;"></div> </div> <script type="text/javascript" language="javascript"> var chart@(Model.Widget.Id); function LoadPieChart() { chart@(Model.Widget.Id) = new cfx.Chart(); chart@(Model.Widget.Id).setGallery(cfx.Gallery.Pie); chart@(Model.Widget.Id).getAllSeries().getPointLabels().setVisible(true); var pieAttr = chart@(Model.Widget.Id).getAllSeries().getGalleryAttributes(); pieAttr.setSliceSeparation(50); pieAttr.setLabelsInside(false); pieAttr.setExplodingMode(cfx.ExplodingMode.First); //chart@(Model.Widget.Id).getAllSeries().getPointLabels().setFormat("%l %p%%"); chart@(Model.Widget.Id).getAllSeries().getPointLabels().setFormat("%p%%"); var str = @Html.Raw(Json.Encode(ViewData["Asset Allocations Chart"])); chart@(Model.Widget.Id).getAxisY().getDataFormat().setDecimals(2); chart@(Model.Widget.Id).getView3D().setEnabled(true); chart@(Model.Widget.Id).setDataSource(str); var data = chart@(Model.Widget.Id).getData(); data.setSeries(1); data.setPoints(10); chart@(Model.Widget.Id).getToolTips().setEnabled(true); chart@(Model.Widget.Id).getToolTips().setAlignment("near"); chart@(Model.Widget.Id).getToolTips().setFormat("%l%"); chart@(Model.Widget.Id).getLegendBox().setVisible(false); @*chart@(Model.Widget.Id).getLegendBox().setWidth(175); chart@(Model.Widget.Id).getLegendBox().setDock(cfx.DockArea.Right); chart@(Model.Widget.Id).getLegendBox().setContentLayout(cfx.ContentLayout.Near);*@ chart@(Model.Widget.Id).getPlotAreaMargin().setTop(0); chart@(Model.Widget.Id).getPlotAreaMargin().setBottom(0); chart@(Model.Widget.Id).getPlotAreaMargin().setRight(0); chart@(Model.Widget.Id).getPlotAreaMargin().setLeft(0); var divHolder = document.getElementById('ChartDiv'); chart@(Model.Widget.Id).create(divHolder); } $(function() { LoadPieChart(); }); function ResizeChart() { if (chart@(Model.Widget.Id) != null) chart@(Model.Widget.Id).doUpdate(true); }; </script>
  15. when I placed the label inside the pie chart(Code in bold). When i decrease the size of the page with the jChartFx pie chart the label inside the chart gets pushed outside of the pie chart with pointers. It seem after a certain size of the page where the jChartFx pie chart is on it pushes the label outside of the pie chart. How can I make the label inside the pie chart stay inside the pie chart no matter what size the page with jChartFx pie chart is? code: @model ePortfolio.Models.WidgetViewModel @using System.Web.Script.Serialization; <div class="widget-head" style="display:block;overflow:no-content;height:10%;width:100%;"> <div class="widget-title text-center" style="padding-top:10px;"><label>@Model.Widget.Title</label></div> <div id="id-refresh-@Model.Widget.Id" class="wdgbkg"> </div> </div> <div class="widget-body" style="display: inline-block;overflow: visible;height:100%;width:100%;"> <div class="widget-content" id="ChartDiv" style="display: inline-block; overflow: visible;height:90%;width:100%;"></div> </div> <script type="text/javascript" language="javascript"> var chart@(Model.Widget.Id); function LoadPieChart() { chart@(Model.Widget.Id) = new cfx.Chart(); chart@(Model.Widget.Id).setGallery(cfx.Gallery.Pie); chart@(Model.Widget.Id).getAllSeries().getPointLabels().setVisible(true); var pieAttr = chart@(Model.Widget.Id).getAllSeries().getGalleryAttributes(); pieAttr.setSliceSeparation(50); pieAttr.setLabelsInside(true); pieAttr.setExplodingMode(cfx.ExplodingMode.First); //chart@(Model.Widget.Id).getAllSeries().getPointLabels().setFormat("%l %p%%"); chart@(Model.Widget.Id).getAllSeries().getPointLabels().setFormat("%p%%"); var str = @Html.Raw(Json.Encode(ViewData["Asset Allocations Chart"])); chart@(Model.Widget.Id).getAxisY().getDataFormat().setDecimals(2); chart@(Model.Widget.Id).getView3D().setEnabled(true); chart@(Model.Widget.Id).setDataSource(str); var data = chart@(Model.Widget.Id).getData(); data.setSeries(1); data.setPoints(10); chart@(Model.Widget.Id).getToolTips().setEnabled(true); chart@(Model.Widget.Id).getToolTips().setAlignment("near"); chart@(Model.Widget.Id).getToolTips().setFormat("%l%"); chart@(Model.Widget.Id).getLegendBox().setVisible(false); @*chart@(Model.Widget.Id).getLegendBox().setWidth(175); chart@(Model.Widget.Id).getLegendBox().setDock(cfx.DockArea.Right); chart@(Model.Widget.Id).getLegendBox().setContentLayout(cfx.ContentLayout.Near);*@ chart@(Model.Widget.Id).getPlotAreaMargin().setTop(0); chart@(Model.Widget.Id).getPlotAreaMargin().setBottom(0); chart@(Model.Widget.Id).getPlotAreaMargin().setRight(0); chart@(Model.Widget.Id).getPlotAreaMargin().setLeft(0); var divHolder = document.getElementById('ChartDiv'); chart@(Model.Widget.Id).create(divHolder); } $(function() { LoadPieChart(); }); function ResizeChart() { if (chart@(Model.Widget.Id) != null) chart@(Model.Widget.Id).doUpdate(true); }; </script>
×