| Author |
Comment/Response |
Tanya
|
09/11/02 10:04am
How to:
1. create a notebook which shows a chart (pie chart, for instance)?
What I done is:
------------------
p = PieChart[{140, 2154, 6091, 1218, 1070},
PieLabels -> {"Applications", "IT", "Helpdesk", "Administration", "Telecom"},
PlotLabel -> "CALLS BY TYPE, 2002 year",
DefaultFont -> {"Helvetica", 12}]
NotebookPut[
Notebook[{Cell["p", "myStyle"]},
StyleDefinitions ->
Notebook[{Cell[StyleData["myStyle"], FontSize -> 288,
TextAlignment -> Center,
FontColor -> RGBColor[.7, .38, .27]]}]]];
THIS code does piechart after it, notebook - separately, with the letter P istead of CHART!!!
Becuase nothing from options I can use here istead of "myStyle" - cahrt is not a Text or Section, Subsection, whatever.
How to do chart in notebook?
2. HOW TO create a notebook with the button, pressing on which I can get the piechart (within this notebook or new one)?
my code is :
p = PieChart[{140, 2154, 6091, 1218, 1070},
PieLabels -> {"Applications", "IT", "Helpdesk", "Administration", "Telecom"},
PlotLabel -> "CALLS BY TYPE, 2002 year",
DefaultFont -> {"Helvetica", 12} ];
NotebookPut[Notebook[
CellPrint[
Cell[BoxData[
ButtonBox["mytest",
ButtonFunction :> CellPrint[Cell[ "p", "Input"]],
Active -> True]], "Text"]] ]
]
It shows empty notebook separately, and chart with button separately.
And I need a button in the notebook, click on it -> get chart.
Thanks!
Tanya
URL: , |
|