How to add a jquery chart to an openxml word doc?

Home Forums Open-Xml-Sdk How to add a jquery chart to an openxml word doc?

This topic contains 40 replies, has 4 voices, and was last updated by  rogersb 8 years, 3 months ago.

Viewing 11 posts - 31 through 41 (of 41 total)
  • Author
    Posts
  • #3273

    rogersb
    Participant

    Eric

    If you could please describe how this could happen: the bar chart is made, the template in word is used and its formed to a new docx and the user downloads it so the original is not overwritten, but on the bar chart there is a 0 – 100% label at the bottom ok?

    in your code there is a 2d array, ChartData. SeriesNames I dont use, they are “. ” just so they dont print, i have 3 category names, values i use vars for the new double[][]

    its a 0-100 bar chart. for most projects run it shows up fine, but on one? instead of starting at 0 the chart starts at 86 – 100 as if its resizing or re scaling automatically, or if something is ruining the series data. the 3 series are: 91, 95, 95. so instead of start at 0 ? it starts at 86 so that the 91 is at the 40% mark instead of the 91% mark

    what could be causing the code to choose to not start at 0? how is the 0-100 scale plotted?

    the rest of it is maybe 90% working, I have not found how to control the fonts or font color, it chooses to overwrite those settings, thats not good, but the scale starting at 86% ???

    what could do that?
    thanks

    #3274

    rogersb
    Participant

    charts axis options bounds minimum. it gets set to .86 by the software

    range is 0 to 1

    bounds maximum is 1.0 meaning 100%

    something is setting that bounds minumum from 0 and making it .86 which ruins the chart data, do you have any idea what part of the code may be doing this or how to force the value to 0 ?

    #3275

    rogersb
    Participant

    i have tried to “lock” the settings in the docx template, but they are trampled on by the program and arbitrarily get set.

    Its possible that since they get deleted they go to default, so whats needed is to find how to set those obscure parameters. Also the chart series names don’t need to be over written but attempts to comment out this part hasnt worked right

    #3299

    rogersb
    Participant

    Eric,
    any idea how i can find the setting to force “charts axis options bounds minimum” to be 0? it is scaling the values, they MUST be locked at 0 – 100.

    In the constructed chart that results from the code, it scales to .86 (in this case) to land the chart values near the center. I can go into the chart in the resulting docx right click and manually change it to 0, then its correct. That is unacceptable…

    I search for 86 in the code and find this:
    ` C.CategoryAxis categoryAxis1 = new C.CategoryAxis();
    C.AxisId axisId3 = new C.AxisId(){ Val = (UInt32Value)775286528U };`

    it has ’86’ in there. I have tried setting the style and saving the setting at zero for the bounds, it auto scales anyway

    what would it be called? what parameter name?

    #3303

    Eric White
    Keymaster

    Hi Roger,

    I have worked with DrawingML objects only a couple of times in my entire Open XML experience, so don’t have any insight to your question. However, the Open XML standard certainly documents everything. It’s all in there. In general, I didn’t find DrawingML hard to work with, so I suggest you just dig in and read through the appropriate sections of the standard. This is what I would have to do to answer your question.

    Cheers, Eric

    #3317

    rogersb
    Participant

    Ok, so far havent found it.

    Trying to put the labels of the 3 bars on the LEFT side. They are on the right. have tried to modify the template, cannot figure out how even to do this. do you know how to put the labels on the left side of the bar chart?

    #3339

    Eric White
    Keymaster

    Hi,

    In order to figure this out, I recommend using the approach detailed in:

    How to Research Open XML Markup

    This is the approach I would need to take in order to figure out the answer to your question. Of course, I could do this, but it would be better for you to learn how to do this for yourself. 🙂

    Cheers, Eric

    #3351

    rogersb
    Participant

    Ive done the approach you suggest. one word doc with those labels on the right showing, another with them deleted. virtually identical. 3 differences, they were the rsid

    Paragraph paragraph1 = new Paragraph(){ RsidParagraphMarkRevision = “00FA5535”, RsidParagraphAddition = “00D8122F”, RsidParagraphProperties = “006C43BF”, RsidRunAdditionDefault = “00E0550F” };
    the very last bit was different by “00C73983” }

    all 3 differences are identical to this.

    I am guessing that the chart is simply “reset”. as a kludge, I made the text font of the %values the same grey color as the background. but many charts are coming up with 100% and the half of a ‘0’ is showing up.

    So there are 2 problems, the scaling of the graphs and the other half of the %value marker is not staying deleted. If I could make a template that may work, but after days of trying that, still not working.

    have the ecma pdf. older one as you suggested. will try to find and figure out. 60+ people waiting for it this morning, now, need to print now. my fault for not having it done…

    #3604

    Volosatoff
    Participant

    На Формуле программиста я выполнила урок «Работа с WinAPI» на видеокурсе «Новые технологии» за 2 час. 10 мин. Чему я научилась: потренировалась с listbox, checkbox, узнала про выполнения запросов dll и что такое WinAPI. Что было самым сложным: Благодаря замечательной подаче материала сложностей не возникло :). Моё мнение: WinAPI это системные вызовы ОС. Например чтение/запись ключей реестра без WinAPI реализовать вроде как нельзя, а вся конфигурация (да и вообще всё) хранится именно там, следовательно и к железу напрямую вы не сможете обратиться без него. Урок безумно понравился, очень полезная и практически применимая программа, она мне обязательно пригодиться) Спасибо! Вот ссылка на мой отчёт: http://www.videosharp.info/24/checking/soft2=93 С уважением, Оля

    #3607

    rogersb
    Participant

    Its like going to a beach, looking for a specific grain of sand that I cannot really identify too well. Thats how changing the scale of the horiz bar chart has been. But its solved and working now. To anyone else trying to do this? Better you figure it out for yourself perhaps. This is advice to those trying to understand

    #3608

    rogersb
    Participant

    Da, Privet I understand you have done training and are practicing with the WinAPI, this is great. What is it specifically you want to do? Its a matter of study then working in software; or if you can improve some software? or make a new one? People might buy it

Viewing 11 posts - 31 through 41 (of 41 total)

You must be logged in to reply to this topic.